diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-14 18:45:11 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-10-14 18:45:11 +0000 |
commit | bcbca75e94c8eb7073482fa0c5c8940f39f66849 (patch) | |
tree | 3b14ccd0212ff274d566e9b83460a7f5f4134f93 /lib/CodeGen/CGDebugInfo.cpp | |
parent | c95ff94a2d67093a696a0c70dbb272bcf8b97146 (diff) |
Upgrade to PathV2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index f3d2687f90..5ae4dfe83c 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -33,7 +33,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Dwarf.h" -#include "llvm/Support/Path.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetMachine.h" using namespace clang; @@ -254,10 +254,10 @@ unsigned CGDebugInfo::getColumnNumber(SourceLocation Loc) { StringRef CGDebugInfo::getCurrentDirname() { if (!CWDName.empty()) return CWDName; - char *CompDirnamePtr = NULL; - llvm::sys::Path CWD = llvm::sys::Path::GetCurrentDirectory(); - CompDirnamePtr = DebugInfoNames.Allocate<char>(CWD.size()); - memcpy(CompDirnamePtr, CWD.c_str(), CWD.size()); + llvm::SmallString<256> CWD; + llvm::sys::fs::current_path(CWD); + char *CompDirnamePtr = DebugInfoNames.Allocate<char>(CWD.size()); + memcpy(CompDirnamePtr, CWD.data(), CWD.size()); return CWDName = StringRef(CompDirnamePtr, CWD.size()); } |