diff options
-rw-r--r-- | tools/driver/driver.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp index cfdd9c342a..b6fc981b1d 100644 --- a/tools/driver/driver.cpp +++ b/tools/driver/driver.cpp @@ -225,8 +225,10 @@ int main(int argc, const char **argv) { // We use *argv instead of argv[0] to work around a bogus g++ warning. std::string ProgName(llvm::sys::Path(*argv).getBasename()); if (llvm::StringRef(ProgName).endswith("++") || - llvm::StringRef(ProgName).rsplit('-').first.endswith("++")) + llvm::StringRef(ProgName).rsplit('-').first.endswith("++")) { TheDriver.CCCIsCXX = true; + TheDriver.CCCGenericGCCName = "g++"; + } llvm::OwningPtr<Compilation> C; |