summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ld/llvm-ld.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-12-18 04:13:36 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-12-18 04:13:36 +0000
commit4f63507d054afab14e759f046db5f42e3b96f6fb (patch)
treef4a91e95fd475621d848e05045d17e4afb2ff22f /llvm/tools/llvm-ld/llvm-ld.cpp
parente47230f9b5fc6a7cfbbd897778718ba4ea420624 (diff)
downloadbcm5719-llvm-4f63507d054afab14e759f046db5f42e3b96f6fb.tar.gz
bcm5719-llvm-4f63507d054afab14e759f046db5f42e3b96f6fb.zip
Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.
llvm-svn: 122141
Diffstat (limited to 'llvm/tools/llvm-ld/llvm-ld.cpp')
-rw-r--r--llvm/tools/llvm-ld/llvm-ld.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/tools/llvm-ld/llvm-ld.cpp b/llvm/tools/llvm-ld/llvm-ld.cpp
index 445366c0f73..475fcf4d8ac 100644
--- a/llvm/tools/llvm-ld/llvm-ld.cpp
+++ b/llvm/tools/llvm-ld/llvm-ld.cpp
@@ -526,7 +526,7 @@ int main(int argc, char **argv, char **envp) {
initializeTarget(Registry);
// Initial global variable above for convenience printing of program name.
- progname = sys::Path(argv[0]).getBasename();
+ progname = sys::path::stem(argv[0]);
// Parse the command line options
cl::ParseCommandLineOptions(argc, argv, "llvm linker\n");
@@ -538,11 +538,8 @@ int main(int argc, char **argv, char **envp) {
OutputFilename = "a.exe";
// If there is no suffix add an "exe" one.
- sys::Path ExeFile( OutputFilename );
- if (ExeFile.getSuffix() == "") {
- ExeFile.appendSuffix("exe");
- OutputFilename = ExeFile.str();
- }
+ if (sys::path::extension(OutputFilename).empty())
+ OutputFilename.append(".exe");
}
#endif
OpenPOWER on IntegriCloud