summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.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
commit10700aad85d716e79fd913511c0beb8f67c91bc6 (patch)
treecaabd1e002f3848ea26bff2f93f197138bb610f7 /llvm/lib/MC/MCContext.cpp
parent48a100190e562de481c0200aa3fb6c26d3e2b16f (diff)
downloadbcm5719-llvm-10700aad85d716e79fd913511c0beb8f67c91bc6.tar.gz
bcm5719-llvm-10700aad85d716e79fd913511c0beb8f67c91bc6.zip
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. llvm-svn: 170371
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r--llvm/lib/MC/MCContext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index 19ff49cd8f7..29727ac8a6a 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -35,7 +35,8 @@ MCContext::MCContext(const MCAsmInfo &mai, const MCRegisterInfo &mri,
bool DoAutoReset ) :
SrcMgr(mgr), MAI(mai), MRI(mri), MOFI(mofi),
Allocator(), Symbols(Allocator), UsedNames(Allocator),
- NextUniqueID(0),
+ NextUniqueID(0),
+ CompilationDir(llvm::sys::Path::GetCurrentDirectory().str()),
CurrentDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0),
DwarfLocSeen(false), GenDwarfForAssembly(false), GenDwarfFileNumber(0),
AllowTemporaryLabels(true), AutoReset(DoAutoReset) {
OpenPOWER on IntegriCloud