Module &M, StringRef Str, bool AllowMerging) {
Constant *StrConst = ConstantDataArray::getString(M.getContext(), Str);
// For module-local strings that can be merged with another one we set the
- // internal linkage and the unnamed_addr attribute.
+ // private linkage and the unnamed_addr attribute.
// Non-mergeable strings are made linker_private to remove them from the
// symbol table. "private" linkage doesn't work for Darwin, where the
// "L"-prefixed globals end up in __TEXT,__const section
// (see http://llvm.org/bugs/show_bug.cgi?id=17976 for more info).
GlobalValue::LinkageTypes linkage =
- AllowMerging ? GlobalValue::InternalLinkage
+ AllowMerging ? GlobalValue::PrivateLinkage
: GlobalValue::LinkerPrivateLinkage;
GlobalVariable *GV =
new GlobalVariable(M, StrConst->getType(), true,