aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-17 21:32:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-17 21:32:42 +0000
commit6c31d313575bba1b87b583260f39f0b0dae143f4 (patch)
treef51bbd65f53587671d77034d5d65ad0ee8506afe /lib/MC/MCDwarf.cpp
parentc83b8fec01565df67da45f437ca1311f7286e53b (diff)
downloadexternal_llvm-6c31d313575bba1b87b583260f39f0b0dae143f4.zip
external_llvm-6c31d313575bba1b87b583260f39f0b0dae143f4.tar.gz
external_llvm-6c31d313575bba1b87b583260f39f0b0dae143f4.tar.bz2
Prepare LLVM to fix PR14625, exposing a hook in MCContext to manage the
compilation directory. This defaults to the current working directory, just as it always has, but now an assembler can choose to override it with a custom directory. I've taught llvm-mc about this option and added a test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170371 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCDwarf.cpp')
-rw-r--r--lib/MC/MCDwarf.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/MC/MCDwarf.cpp b/lib/MC/MCDwarf.cpp
index 597ee1d..d53d2fc 100644
--- a/lib/MC/MCDwarf.cpp
+++ b/lib/MC/MCDwarf.cpp
@@ -627,8 +627,7 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
MCOS->EmitIntValue(0, 1); // NULL byte to terminate the string.
// AT_comp_dir, the working directory the assembly was done in.
- llvm::sys::Path CWD = llvm::sys::Path::GetCurrentDirectory();
- MCOS->EmitBytes(StringRef(CWD.c_str()), 0);
+ MCOS->EmitBytes(context.getCompilationDir(), 0);
MCOS->EmitIntValue(0, 1); // NULL byte to terminate the string.
// AT_APPLE_flags, the command line arguments of the assembler tool.