[clang] 8feb92a - [clang][tests] Add missing compiler name

Timm Bäder via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 9 06:12:07 PDT 2022


Author: Timm Bäder
Date: 2022-06-09T15:11:40+02:00
New Revision: 8feb92add88adbb53729dd10f12667bb326e021e

URL: https://github.com/llvm/llvm-project/commit/8feb92add88adbb53729dd10f12667bb326e021e
DIFF: https://github.com/llvm/llvm-project/commit/8feb92add88adbb53729dd10f12667bb326e021e.diff

LOG: [clang][tests] Add missing compiler name

The driver stripts the first argument. Without the compiler name, the
test depends on whether GCC_INSTALL_PREFIX is set or not.

See https://reviews.llvm.org/D125862

Added: 
    

Modified: 
    clang/unittests/Driver/ToolChainTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp
index 3f59fd4b94616..33389a52c6bb8 100644
--- a/clang/unittests/Driver/ToolChainTest.cpp
+++ b/clang/unittests/Driver/ToolChainTest.cpp
@@ -595,7 +595,7 @@ TEST(ToolChainTest, Toolsets) {
     Driver TheDriver("/bin/clang", "x86_64-redhat-linux", Diags,
                      "clang LLVM compiler", InMemoryFileSystem);
     std::unique_ptr<Compilation> C(
-        TheDriver.BuildCompilation({"--gcc-toolchain="}));
+        TheDriver.BuildCompilation({"clang", "--gcc-toolchain="}));
     ASSERT_TRUE(C);
     std::string S;
     {
@@ -635,7 +635,7 @@ TEST(ToolChainTest, Toolsets) {
     Driver TheDriver("/bin/clang", "x86_64-redhat-linux", Diags,
                      "clang LLVM compiler", InMemoryFileSystem);
     std::unique_ptr<Compilation> C(
-        TheDriver.BuildCompilation({"--gcc-toolchain="}));
+        TheDriver.BuildCompilation({"clang", "--gcc-toolchain="}));
     ASSERT_TRUE(C);
     std::string S;
     {


        


More information about the cfe-commits mailing list