llvm_cbuilder: global string should use LINKONCE_ODR

This commit is contained in:
Siu Kwan Lam 2013-01-10 16:58:50 -06:00
commit a0a777e1aa

View file

@ -494,6 +494,7 @@ class CBuilder(object):
# new constant string
globalstr = mod.add_global_variable(content.type, name=name)
globalstr.initializer = content
globalstr.linkage = lc.LINKAGE_LINKONCE_ODR
globalstr.global_constant = True
else:
# compare existing content