aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-26 05:40:30 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-26 05:40:30 +0000
commit380988340c26965f8cf1024970e8699e5cec0ee7 (patch)
tree92c9e3eeee3ca83e2a4188d45fb1c9bc8af11334 /clang/lib/Frontend/CompilerInvocation.cpp
parent4601c462a7d40d6479d7ad7a1c4b930b5d65b086 (diff)
downloadllvm-380988340c26965f8cf1024970e8699e5cec0ee7.zip
llvm-380988340c26965f8cf1024970e8699e5cec0ee7.tar.gz
llvm-380988340c26965f8cf1024970e8699e5cec0ee7.tar.bz2
Remove PathV1.h from CompilerInvocation.cpp.
llvm-svn: 184918
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 49ce0b7..f362226 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -32,7 +32,6 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/Path.h"
-#include "llvm/Support/PathV1.h"
#include "llvm/Support/system_error.h"
#include <sys/stat.h>
using namespace clang;
@@ -846,16 +845,16 @@ static InputKind ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
std::string CompilerInvocation::GetResourcesPath(const char *Argv0,
void *MainAddr) {
- llvm::sys::Path P(llvm::sys::fs::getMainExecutable(Argv0, MainAddr));
+ SmallString<128> P(llvm::sys::fs::getMainExecutable(Argv0, MainAddr));
- if (!P.isEmpty()) {
- P.eraseComponent(); // Remove /clang from foo/bin/clang
- P.eraseComponent(); // Remove /bin from foo/bin
+ if (!P.empty()) {
+ llvm::sys::path::remove_filename(P); // Remove /clang from foo/bin/clang
+ llvm::sys::path::remove_filename(P); // Remove /bin from foo/bin
// Get foo/lib/clang/<version>/include
- P.appendComponent("lib");
- P.appendComponent("clang");
- P.appendComponent(CLANG_VERSION_STRING);
+ llvm::sys::path::append(P, "lib");
+ llvm::sys::path::append(P, "clang");
+ llvm::sys::path::append(P, CLANG_VERSION_STRING);
}
return P.str();