From: Daniel Dunbar Date: Fri, 25 Dec 2009 20:21:23 +0000 (+0000) Subject: Driver: Use "g++" as generic gcc name when running in C++ mode, for platforms X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0dea4be511706307849d83a89f56695444c718ac;p=clang Driver: Use "g++" as generic gcc name when running in C++ mode, for platforms that lack real tool definitions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92164 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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 C;