]> granicus.if.org Git - clang/commitdiff
Avoid picking up system headers in unittest by providing a fake libstdc++ with a...
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 1 Dec 2015 19:42:07 +0000 (19:42 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 1 Dec 2015 19:42:07 +0000 (19:42 +0000)
The host libstdc++ may be horribly broken and we want the fake one to be
picked up. This workaround is lame but I don't see a better way.

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

unittests/libclang/LibclangTest.cpp

index 9eb3fd043f44edf24d9369f7900240716b941c65..e190dec89a87bcc2b87de9a219a346f6a5921a9e 100644 (file)
@@ -469,9 +469,11 @@ TEST_F(LibclangReparseTest, ReparseWithModule) {
 }
 
 TEST_F(LibclangReparseTest, clang_parseTranslationUnit2FullArgv) {
-  std::string EmptyFiles[] = {"lib/gcc/arm-linux-gnueabi/4.6.1/crtbegin.o",
+  // Provide a fake GCC 99.9.9 standard library that always overrides any local
+  // GCC installation.
+  std::string EmptyFiles[] = {"lib/gcc/arm-linux-gnueabi/99.9.9/crtbegin.o",
                               "include/arm-linux-gnueabi/.keep",
-                              "include/c++/4.6.1/vector"};
+                              "include/c++/99.9.9/vector"};
 
   for (auto &Name : EmptyFiles)
     WriteFile(Name, "\n");