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
This commit is contained in:
Chandler Carruth
2012-12-17 21:32:42 +00:00
parent c83b8fec01
commit 6c31d31357
5 changed files with 30 additions and 4 deletions

7
test/MC/ELF/comp-dir.s Normal file
View File

@@ -0,0 +1,7 @@
// RUN: llvm-mc -g -fdebug-compilation-dir=/test/comp/dir %s -filetype=obj -o %t.o
// RUN: llvm-dwarfdump %t.o | FileCheck %s
// CHECK: DW_AT_comp_dir [DW_FORM_string] ("/test/comp/dir")
f:
nop