Remove DIBuilder cache of variable TheCU and change the few

uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186599 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2013-07-18 19:11:29 +00:00
parent ef69f54fec
commit 6abb4d2ef2
3 changed files with 27 additions and 23 deletions
+3 -3
View File
@@ -289,9 +289,9 @@ private:
"LLVM Version " STR(LLVM_VERSION_MAJOR) "." STR(LLVM_VERSION_MINOR);
}
Builder.createCompileUnit(dwarf::DW_LANG_C99, Filename, Directory, Producer,
IsOptimized, Flags, RuntimeVersion);
CUNode = Builder.getCU();
CUNode =
Builder.createCompileUnit(dwarf::DW_LANG_C99, Filename, Directory,
Producer, IsOptimized, Flags, RuntimeVersion);
if (CUToReplace)
CUToReplace->replaceAllUsesWith(const_cast<MDNode *>(CUNode));