Fix program name in "clang -help"

With out this patch,
"clang -help" prints "USAGE: clang-3 [options] <inputs>".
It should either print
USAGE: clang [options] <inputs>
or

USAGE: clang-3.7 [options] <inputs>
With this patch, on Linux, it prints
USAGE: clang-3.7 [options] <inputs>

On Windows, it prints
USAGE: clang.exe [options] <inputs>

llvm-svn: 231124
This commit is contained in:
Sumanth Gundapaneni 2015-03-03 20:43:12 +00:00
parent 948602bd17
commit 3a159294d0
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef DefaultTargetTriple,
CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true), CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true),
CCCUsePCH(true), SuppressMissingInputWarning(false) { CCCUsePCH(true), SuppressMissingInputWarning(false) {
Name = llvm::sys::path::stem(ClangExecutable); Name = llvm::sys::path::filename(ClangExecutable);
Dir = llvm::sys::path::parent_path(ClangExecutable); Dir = llvm::sys::path::parent_path(ClangExecutable);
// Compute the path to the resource directory. // Compute the path to the resource directory.