From ef03b9fc52077bddb29f1549afb2defeb53af8c2 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 14 Jun 2013 20:26:58 +0000 Subject: Replace use of PathV1.h in MCContext.cpp. GetCurrentDirectory is now unused. Remove it. llvm-svn: 184003 --- llvm/lib/MC/MCContext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/MC/MCContext.cpp') diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index b56017db935..b9977864a87 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; -- cgit v1.2.3