diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-08 01:26:06 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-08 01:26:06 +0000 |
commit | 3d29df3e8a203b167d8071ea6f805b21db18a5af (patch) | |
tree | 04e35fb85689b9621ea6ec76db47849335a87c5c /lib/Analysis/DebugInfo.cpp | |
parent | 8b8d31e3ec8c491a893307069ac123728c84782c (diff) | |
download | external_llvm-3d29df3e8a203b167d8071ea6f805b21db18a5af.zip external_llvm-3d29df3e8a203b167d8071ea6f805b21db18a5af.tar.gz external_llvm-3d29df3e8a203b167d8071ea6f805b21db18a5af.tar.bz2 |
Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 99a0244..363ecab 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -490,7 +490,7 @@ Constant *DIFactory::GetStringConstant(const std::string &String) { Constant *ConstStr = VMContext.getConstantArray(String); // Otherwise create and return a new string global. - GlobalVariable *StrGV = new GlobalVariable(ConstStr->getType(), true, + GlobalVariable *StrGV = new GlobalVariable(VMContext,ConstStr->getType(), true, GlobalVariable::InternalLinkage, ConstStr, ".str", &M); StrGV->setSection("llvm.metadata"); @@ -516,7 +516,7 @@ DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) { DIDescriptor &Entry = SimpleConstantCache[Init]; if (!Entry.isNull()) return DIArray(Entry.getGV()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.array", &M); GV->setSection("llvm.metadata"); @@ -542,7 +542,7 @@ DISubrange DIFactory::GetOrCreateSubrange(int64_t Lo, int64_t Hi) { M.addTypeName("llvm.dbg.subrange.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.subrange", &M); GV->setSection("llvm.metadata"); @@ -579,7 +579,7 @@ DICompileUnit DIFactory::CreateCompileUnit(unsigned LangID, sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.compile_unit.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::LinkOnceAnyLinkage, Init, "llvm.dbg.compile_unit", &M); GV->setSection("llvm.metadata"); @@ -598,7 +598,7 @@ DIEnumerator DIFactory::CreateEnumerator(const std::string &Name, uint64_t Val){ sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.enumerator.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.enumerator", &M); GV->setSection("llvm.metadata"); @@ -632,7 +632,7 @@ DIBasicType DIFactory::CreateBasicType(DIDescriptor Context, sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.basictype.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.basictype", &M); GV->setSection("llvm.metadata"); @@ -668,7 +668,7 @@ DIDerivedType DIFactory::CreateDerivedType(unsigned Tag, sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.derivedtype.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.derivedtype", &M); GV->setSection("llvm.metadata"); @@ -708,7 +708,7 @@ DICompositeType DIFactory::CreateCompositeType(unsigned Tag, sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.composite.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.composite", &M); GV->setSection("llvm.metadata"); @@ -746,7 +746,7 @@ DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context, sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.subprogram.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::LinkOnceAnyLinkage, Init, "llvm.dbg.subprogram", &M); GV->setSection("llvm.metadata"); @@ -780,7 +780,7 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, const std::string &Name, sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.global_variable.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::LinkOnceAnyLinkage, Init, "llvm.dbg.global_variable", &M); GV->setSection("llvm.metadata"); @@ -806,7 +806,7 @@ DIVariable DIFactory::CreateVariable(unsigned Tag, DIDescriptor Context, sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.variable.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.variable", &M); GV->setSection("llvm.metadata"); @@ -826,7 +826,7 @@ DIBlock DIFactory::CreateBlock(DIDescriptor Context) { sizeof(Elts)/sizeof(Elts[0])); M.addTypeName("llvm.dbg.block.type", Init->getType()); - GlobalVariable *GV = new GlobalVariable(Init->getType(), true, + GlobalVariable *GV = new GlobalVariable(VMContext, Init->getType(), true, GlobalValue::InternalLinkage, Init, "llvm.dbg.block", &M); GV->setSection("llvm.metadata"); |