[llgo] Remove support for LLVM attributes

llgo supports the application of LLVM attributes to global objects
and functions.  This "feature" is undocumented and untested.  As
discusses in D27442, it should be removed.

Differential Revision: https://reviews.llvm.org/D27474

llvm-svn: 288843
GitOrigin-RevId: e6c29d6d854cbbafc108cf32f9676157464f39fc
diff --git a/irgen/attribute.go b/irgen/attribute.go
index 9fd6f61..82f264e 100644
--- a/irgen/attribute.go
+++ b/irgen/attribute.go
@@ -74,8 +74,6 @@
 		return parseLinkageAttribute(value)
 	case "name":
 		return nameAttribute(strings.TrimSpace(value))
-	case "attr":
-		return parseLLVMAttribute(strings.TrimSpace(value))
 	case "thread_local":
 		return tlsAttribute{}
 	default:
@@ -142,36 +140,6 @@
 	}
 }
 
-func parseLLVMAttribute(value string) llvmAttribute {
-	var result llvmAttribute
-	value = strings.Replace(value, ",", " ", -1)
-	for _, field := range strings.Fields(value) {
-		switch strings.ToLower(field) {
-		case "noreturn":
-		case "nounwind":
-		case "noinline":
-		case "alwaysinline":
-			kind := llvm.AttributeKindID(strings.ToLower(field))
-			result.AttrKinds = append(result.AttrKinds, kind)
-		}
-	}
-	return result
-}
-
-type llvmAttribute struct {
-	AttrKinds []uint
-}
-
-func (a llvmAttribute) Apply(v llvm.Value) {
-	ctx := v.GlobalParent().Context()
-	if !v.IsAFunction().IsNil() {
-		for _, kind := range a.AttrKinds {
-			attr := ctx.CreateEnumAttribute(kind, 0)
-			v.AddFunctionAttr(attr)
-		}
-	}
-}
-
 type tlsAttribute struct{}
 
 func (tlsAttribute) Apply(v llvm.Value) {