summaryrefslogtreecommitdiffstats
path: root/llvm/bindings/go
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-06-15 22:16:51 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-06-15 22:16:51 +0000
commit58af6d1594778173f757131bdc25f850e00c7420 (patch)
tree773688f5bebc8273170d7831d24aa314dc5d8f58 /llvm/bindings/go
parent1b66f5dc82a82ab0a3c0ea837bafc7a00e792b32 (diff)
downloadbcm5719-llvm-58af6d1594778173f757131bdc25f850e00c7420.tar.gz
bcm5719-llvm-58af6d1594778173f757131bdc25f850e00c7420.zip
Add safestack attribute to LLVMAttribute enum and Go bindings. Correct
constants in commented-out part of LLVMAttribute enum. Add tests that verify that the safestack attribute is only allowed as a function attribute. llvm-svn: 239772
Diffstat (limited to 'llvm/bindings/go')
-rw-r--r--llvm/bindings/go/llvm/ir.go2
-rw-r--r--llvm/bindings/go/llvm/ir_test.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/bindings/go/llvm/ir.go b/llvm/bindings/go/llvm/ir.go
index e5916a1bacf..1f00cd58473 100644
--- a/llvm/bindings/go/llvm/ir.go
+++ b/llvm/bindings/go/llvm/ir.go
@@ -160,6 +160,8 @@ const (
InAllocaAttribute Attribute = 1 << 43
NonNullAttribute Attribute = 1 << 44
JumpTableAttribute Attribute = 1 << 45
+ ConvergentAttribute Attribute = 1 << 46
+ SafeStackAttribute Attribute = 1 << 47
)
//-------------------------------------------------------------------------
diff --git a/llvm/bindings/go/llvm/ir_test.go b/llvm/bindings/go/llvm/ir_test.go
index 981c94aa63e..edeeab935db 100644
--- a/llvm/bindings/go/llvm/ir_test.go
+++ b/llvm/bindings/go/llvm/ir_test.go
@@ -53,6 +53,7 @@ func TestAttributes(t *testing.T) {
{AlwaysInlineAttribute, "alwaysinline"},
{BuiltinAttribute, "builtin"},
{ByValAttribute, "byval"},
+ {ConvergentAttribute, "convergent"},
{InAllocaAttribute, "inalloca"},
{InlineHintAttribute, "inlinehint"},
{InRegAttribute, "inreg"},
@@ -78,6 +79,7 @@ func TestAttributes(t *testing.T) {
{ReturnedAttribute, "returned"},
{ReturnsTwiceAttribute, "returns_twice"},
{SExtAttribute, "signext"},
+ {SafeStackAttribute, "safestack"},
{StackProtectAttribute, "ssp"},
{StackProtectReqAttribute, "sspreq"},
{StackProtectStrongAttribute, "sspstrong"},
OpenPOWER on IntegriCloud