aboutsummaryrefslogtreecommitdiffhomepage
path: root/compiler/symbol.go
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/symbol.go')
-rw-r--r--compiler/symbol.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/symbol.go b/compiler/symbol.go
index c2007cfd4..5447e0dba 100644
--- a/compiler/symbol.go
+++ b/compiler/symbol.go
@@ -172,6 +172,9 @@ func (c *compilerContext) getFunction(fn *ssa.Function) (llvm.Type, llvm.Value)
llvmFn.AddAttributeAtIndex(1, c.ctx.CreateEnumAttribute(llvm.AttributeKindID("nocapture"), 0))
llvmFn.AddAttributeAtIndex(2, c.ctx.CreateEnumAttribute(llvm.AttributeKindID("readonly"), 0))
llvmFn.AddAttributeAtIndex(2, c.ctx.CreateEnumAttribute(llvm.AttributeKindID("nocapture"), 0))
+ case "runtime.stringFromBytes":
+ llvmFn.AddAttributeAtIndex(1, c.ctx.CreateEnumAttribute(llvm.AttributeKindID("nocapture"), 0))
+ llvmFn.AddAttributeAtIndex(1, c.ctx.CreateEnumAttribute(llvm.AttributeKindID("readonly"), 0))
case "runtime.trackPointer":
// This function is necessary for tracking pointers on the stack in a
// portable way (see gc_stack_portable.go). Indicate to the optimizer