diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-17 23:29:40 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-17 23:29:40 +0000 |
commit | c7f29dc068c54ff74ced4653f6d0b25a3cf6b429 (patch) | |
tree | 7e5129d5874edb7e23522523be655ab2b9766a2d /llvm/lib/MC/MCDwarf.cpp | |
parent | ffdfaa690834a7371e5244bde684ff555888854e (diff) | |
download | bcm5719-llvm-c7f29dc068c54ff74ced4653f6d0b25a3cf6b429.tar.gz bcm5719-llvm-c7f29dc068c54ff74ced4653f6d0b25a3cf6b429.zip |
DebugInfo: Move line table zero-directory-index (compilation dir) handling into MCDwarf
Our handling of compilation directory in DwarfDebug was broken
(incorrectly using the 'last' compilation directory (that of the last
CU in the metadata list) for all function emission in any CU). By moving
this handling down into MCDwarf the issue is fixed as the compilation
dir is tracked correctly per line table.
llvm-svn: 204089
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index edeee20ab47..f5260952c7a 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -340,6 +340,8 @@ unsigned MCDwarfLineTable::getFile(StringRef &Directory, StringRef &FileName, unsigned MCDwarfLineTableHeader::getFile(StringRef &Directory, StringRef &FileName, unsigned FileNumber) { + if (Directory == CompilationDir) + Directory = ""; if (FileName.empty()) { FileName = "<stdin>"; Directory = ""; |