aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--compiler/compiler.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/compiler.go b/compiler/compiler.go
index efe3b2fb8..f7f9db2b4 100644
--- a/compiler/compiler.go
+++ b/compiler/compiler.go
@@ -2734,6 +2734,7 @@ func (c *Compiler) parseConst(prefix string, expr *ssa.Const) (llvm.Value, error
global.SetInitializer(c.ctx.ConstString(str, false))
global.SetLinkage(llvm.InternalLinkage)
global.SetGlobalConstant(true)
+ global.SetUnnamedAddr(true)
zero := llvm.ConstInt(llvm.Int32Type(), 0, false)
strPtr := c.builder.CreateInBoundsGEP(global, []llvm.Value{zero, zero}, "")
strObj := llvm.ConstNamedStruct(c.mod.GetTypeByName("runtime._string"), []llvm.Value{strPtr, strLen})