summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-18 00:19:12 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-18 00:19:12 +0000
commite169675474778f340e9ed3267c2d3330b3dd331d (patch)
tree48c4c82b3fcf5b7ceeffd25e4f90f27b16608aa4 /clang/lib/Driver/Driver.cpp
parent762a55b19f6a33ca0bb897a6cab35cc02739029a (diff)
downloadbcm5719-llvm-e169675474778f340e9ed3267c2d3330b3dd331d.tar.gz
bcm5719-llvm-e169675474778f340e9ed3267c2d3330b3dd331d.zip
Replace all uses of PathV1::getLast with PathV2::filename.
llvm-svn: 122117
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index e8cfd711a3b..e24ec077718 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -1195,8 +1195,8 @@ const char *Driver::GetNamedOutputPath(Compilation &C,
return C.addTempFile(C.getArgs().MakeArgString(TmpName.c_str()));
}
- llvm::sys::Path BasePath(BaseInput);
- std::string BaseName(BasePath.getLast());
+ llvm::SmallString<128> BasePath(BaseInput);
+ llvm::StringRef BaseName = llvm::sys::path::filename(BasePath);
// Determine what the derived output name should be.
const char *NamedOutput;
@@ -1217,11 +1217,11 @@ const char *Driver::GetNamedOutputPath(Compilation &C,
// As an annoying special case, PCH generation doesn't strip the pathname.
if (JA.getType() == types::TY_PCH) {
- BasePath.eraseComponent();
- if (BasePath.isEmpty())
+ llvm::sys::path::remove_filename(BasePath);
+ if (BasePath.empty())
BasePath = NamedOutput;
else
- BasePath.appendComponent(NamedOutput);
+ llvm::sys::path::append(BasePath, NamedOutput);
return C.addResultFile(C.getArgs().MakeArgString(BasePath.c_str()));
} else {
return C.addResultFile(NamedOutput);
OpenPOWER on IntegriCloud