Minor fix in ToolChainTest.cpp to allow user defined GCC toolchain.
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.
llvm-svn: 251459
diff --git a/clang/unittests/Driver/ToolChainTest.cpp b/clang/unittests/Driver/ToolChainTest.cpp
index 5159e80..ef21e2d 100644
--- a/clang/unittests/Driver/ToolChainTest.cpp
+++ b/clang/unittests/Driver/ToolChainTest.cpp
@@ -58,8 +58,8 @@
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 @@
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;
{