summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-03-17 23:29:40 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-03-17 23:29:40 +0000
commitc7f29dc068c54ff74ced4653f6d0b25a3cf6b429 (patch)
tree7e5129d5874edb7e23522523be655ab2b9766a2d /llvm/lib/MC/MCDwarf.cpp
parentffdfaa690834a7371e5244bde684ff555888854e (diff)
downloadbcm5719-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.cpp2
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 = "";
OpenPOWER on IntegriCloud