diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-03-13 00:01:35 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-03-13 00:01:35 +0000 |
commit | de3077ae6b5ad8e6f417a8f6aa0ca1ae980f6272 (patch) | |
tree | 54b7fc0b810ea78b5cd7c0a16bbaea5b1e7f1796 /lib/IR/DIBuilder.cpp | |
parent | b79d25ca9c3b895d8fdc88c3acefec1202ca9da3 (diff) | |
download | external_llvm-de3077ae6b5ad8e6f417a8f6aa0ca1ae980f6272.zip external_llvm-de3077ae6b5ad8e6f417a8f6aa0ca1ae980f6272.tar.gz external_llvm-de3077ae6b5ad8e6f417a8f6aa0ca1ae980f6272.tar.bz2 |
Refactor filename/directory in DICompileUnit into a DIFile
This is the next step towards making the metadata for DIScopes have a common
prefix rather than having to delegate based on their tag type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DIBuilder.cpp')
-rw-r--r-- | lib/IR/DIBuilder.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index 9369c2a..aacd9c4 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -95,8 +95,7 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename, GetTagConstant(VMContext, dwarf::DW_TAG_compile_unit), Constant::getNullValue(Type::getInt32Ty(VMContext)), ConstantInt::get(Type::getInt32Ty(VMContext), Lang), - MDString::get(VMContext, Filename), - MDString::get(VMContext, Directory), + createFile(Filename, Directory), MDString::get(VMContext, Producer), ConstantInt::get(Type::getInt1Ty(VMContext), isOptimized), MDString::get(VMContext, Flags), @@ -117,7 +116,6 @@ void DIBuilder::createCompileUnit(unsigned Lang, StringRef Filename, /// createFile - Create a file descriptor to hold debugging information /// for a file. DIFile DIBuilder::createFile(StringRef Filename, StringRef Directory) { - assert(TheCU && "Unable to create DW_TAG_file_type without CompileUnit"); assert(!Filename.empty() && "Unable to create file without name"); Value *Elts[] = { GetTagConstant(VMContext, dwarf::DW_TAG_file_type), |