summaryrefslogtreecommitdiff
path: root/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-14 20:26:58 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-14 20:26:58 +0000
commit76858a7abd4faeb462e04f177666b87b23b65287 (patch)
treecb6b21d86d87da6f8f3daf8633f12d367720ef2f /lib/MC/MCContext.cpp
parent89dbe9744255864445b1c9f9a613ae333d3f79c8 (diff)
downloadllvm-76858a7abd4faeb462e04f177666b87b23b65287.tar.gz
llvm-76858a7abd4faeb462e04f177666b87b23b65287.tar.bz2
llvm-76858a7abd4faeb462e04f177666b87b23b65287.tar.xz
Replace use of PathV1.h in MCContext.cpp.
GetCurrentDirectory is now unused. Remove it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184003 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCContext.cpp')
-rw-r--r--lib/MC/MCContext.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp
index b56017db93..b9977864a8 100644
--- a/lib/MC/MCContext.cpp
+++ b/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;