bug 4530: Make debug information static to it is preservered during bitcode linking.
authorRichard Pennington <rich@pennware.com>
Fri, 21 Aug 2009 11:10:31 +0000 (11:10 +0000)
committerRichard Pennington <rich@pennware.com>
Fri, 21 Aug 2009 11:10:31 +0000 (11:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79616 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DebugInfo.cpp

index fb80b8346d27c3c9d1d4ebd2d69d226f82d7d5d4..03e08862bd7549aeeb58f59f8c213845d30d6781 100644 (file)
@@ -593,7 +593,7 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID,
   
   M.addTypeName("llvm.dbg.compile_unit.type", Init->getType());
   GlobalVariable *GV = new GlobalVariable(M, Init->getType(), true,
-                                          GlobalValue::LinkOnceAnyLinkage,
+                                          GlobalValue::InternalLinkage,
                                           Init, "llvm.dbg.compile_unit");
   GV->setSection("llvm.metadata");
   return DICompileUnit(GV);
@@ -760,7 +760,7 @@ DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context,
   
   M.addTypeName("llvm.dbg.subprogram.type", Init->getType());
   GlobalVariable *GV = new GlobalVariable(M, Init->getType(), true,
-                                          GlobalValue::LinkOnceAnyLinkage,
+                                          GlobalValue::InternalLinkage,
                                           Init, "llvm.dbg.subprogram");
   GV->setSection("llvm.metadata");
   return DISubprogram(GV);