From bf9eef92b6cd71d262ac12ce6c4919271bd6c910 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 27 Apr 2021 13:31:37 -0700 Subject: [PATCH] Gnu: Replace with a GCCInstallation.isValid() check with assert --- clang/lib/Driver/ToolChains/Gnu.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index e2cec7c3..53bba72 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2964,9 +2964,7 @@ bool Generic_GCC::addLibStdCXXIncludePaths(Twine IncludeDir, StringRef Triple, bool Generic_GCC::addGCCLibStdCxxIncludePaths( const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args, StringRef DebianMultiarch) const { - // Use GCCInstallation to know where libstdc++ headers are installed. - if (!GCCInstallation.isValid()) - return false; + assert(GCCInstallation.isValid()); // By default, look for the C++ headers in an include directory adjacent to // the lib directory of the GCC installation. Note that this is expect to be -- 2.7.4