diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-14 20:26:58 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-14 20:26:58 +0000 |
commit | ef03b9fc52077bddb29f1549afb2defeb53af8c2 (patch) | |
tree | fb7dc5ac458607315287faf43ad43b940f65598c /llvm/lib/MC/MCContext.cpp | |
parent | 059cead5ed7aa11ce1eae0bcc751ea0d1e23ea75 (diff) | |
download | llvm-ef03b9fc52077bddb29f1549afb2defeb53af8c2.zip llvm-ef03b9fc52077bddb29f1549afb2defeb53af8c2.tar.gz llvm-ef03b9fc52077bddb29f1549afb2defeb53af8c2.tar.bz2 |
Replace use of PathV1.h in MCContext.cpp.
GetCurrentDirectory is now unused. Remove it.
llvm-svn: 184003
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index b56017d..b997786 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -21,8 +21,8 @@ #include "llvm/MC/MCSymbol.h" #include "llvm/Support/ELF.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/MemoryBuffer.h" -#include "llvm/Support/PathV1.h" #include "llvm/Support/Signals.h" #include "llvm/Support/SourceMgr.h" using namespace llvm; @@ -38,11 +38,13 @@ MCContext::MCContext(const MCAsmInfo &mai, const MCRegisterInfo &mri, SrcMgr(mgr), MAI(mai), MRI(mri), MOFI(mofi), Allocator(), Symbols(Allocator), UsedNames(Allocator), 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), DwarfCompileUnitID(0), AutoReset(DoAutoReset) { + error_code EC = llvm::sys::fs::current_path(CompilationDir); + assert(!EC && "Could not determine the current directory"); + MachOUniquingMap = 0; ELFUniquingMap = 0; COFFUniquingMap = 0; |