mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Give string constants generated by IRBuilder private linkage.
Fixes PR11640. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147144 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -27,7 +27,7 @@ Value *IRBuilderBase::CreateGlobalString(StringRef Str, const Twine &Name) {
|
||||
Constant *StrConstant = ConstantArray::get(Context, Str, true);
|
||||
Module &M = *BB->getParent()->getParent();
|
||||
GlobalVariable *GV = new GlobalVariable(M, StrConstant->getType(),
|
||||
true, GlobalValue::InternalLinkage,
|
||||
true, GlobalValue::PrivateLinkage,
|
||||
StrConstant, "", 0, false);
|
||||
GV->setName(Name);
|
||||
GV->setUnnamedAddr(true);
|
||||
|
Reference in New Issue
Block a user