]> granicus.if.org Git - clang/commitdiff
Minor fix in ToolChainTest.cpp to allow user defined GCC toolchain.
authorSamuel Antao <sfantao@us.ibm.com>
Tue, 27 Oct 2015 22:20:26 +0000 (22:20 +0000)
committerSamuel Antao <sfantao@us.ibm.com>
Tue, 27 Oct 2015 22:20:26 +0000 (22:20 +0000)
If the user configured clang with a custom GCC toolchain that will take precedence on what the ToolChainTest.cpp expects to evaluate.
This is fixed here by passing --gcc-toolchain= to the driver, in order to override any user defined GCC toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251459 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Driver/ToolChainTest.cpp

index 5159e80cc7a12502a6ce23937da8f51f4021be7c..ef21e2d17c6c857737abdaf735e838d4a7702af7 100644 (file)
@@ -58,8 +58,8 @@ TEST(ToolChainTest, VFSGCCInstallation) {
     InMemoryFileSystem->addFile(Path, 0,
                                 llvm::MemoryBuffer::getMemBuffer("\n"));
 
-  std::unique_ptr<Compilation> C(
-      TheDriver.BuildCompilation({"-fsyntax-only", "foo.cpp"}));
+  std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(
+      {"-fsyntax-only", "--gcc-toolchain=", "foo.cpp"}));
 
   std::string S;
   {
@@ -97,8 +97,8 @@ TEST(ToolChainTest, VFSGCCInstallationRelativeDir) {
     InMemoryFileSystem->addFile(Path, 0,
                                 llvm::MemoryBuffer::getMemBuffer("\n"));
 
-  std::unique_ptr<Compilation> C(
-      TheDriver.BuildCompilation({"-fsyntax-only", "foo.cpp"}));
+  std::unique_ptr<Compilation> C(TheDriver.BuildCompilation(
+      {"-fsyntax-only", "--gcc-toolchain=", "foo.cpp"}));
 
   std::string S;
   {