[PATCH] D38354: Fix test by using -target instead of cc1 arguments (c-index-test goes through the driver)

Filipe Cabecinhas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 28 05:13:59 PDT 2017


filcab created this revision.

If LLVM_DEFAULT_TARGET_TRIPLE is a non-darwin triple, the file might
fail. This might allow us to take out the FIXME and REQUIRES lines, but I'd
rather let the bots double-check that the test is ok first.


https://reviews.llvm.org/D38354

Files:
  test/Index/pch-from-libclang.c


Index: test/Index/pch-from-libclang.c
===================================================================
--- test/Index/pch-from-libclang.c
+++ test/Index/pch-from-libclang.c
@@ -4,10 +4,10 @@
 // REQUIRES: system-darwin
 
 // RUN: %clang_cc1 -fsyntax-only %s -verify
-// RUN: c-index-test -write-pch %t.h.pch %s -fmodules -fmodules-cache-path=%t.mcp -Xclang -triple -Xclang x86_64-apple-darwin
-// RUN: %clang -fsyntax-only -include %t.h %s -Xclang -verify -fmodules -fmodules-cache-path=%t.mcp -Xclang -detailed-preprocessing-record -Xclang -triple -Xclang x86_64-apple-darwin -Xclang -fallow-pch-with-compiler-errors
-// RUN: %clang -x c-header %s -o %t.clang.h.pch -fmodules -fmodules-cache-path=%t.mcp -Xclang -detailed-preprocessing-record -Xclang -triple -Xclang x86_64-apple-darwin -Xclang -fallow-pch-with-compiler-errors -Xclang -verify
-// RUN: c-index-test -test-load-source local %s -include %t.clang.h -fmodules -fmodules-cache-path=%t.mcp -Xclang -triple -Xclang x86_64-apple-darwin | FileCheck %s
+// RUN: c-index-test -write-pch %t.h.pch %s -fmodules -fmodules-cache-path=%t.mcp -target x86_64-apple-darwin
+// RUN: %clang -fsyntax-only -include %t.h %s -Xclang -verify -fmodules -fmodules-cache-path=%t.mcp -Xclang -detailed-preprocessing-record -target x86_64-apple-darwin -Xclang -fallow-pch-with-compiler-errors
+// RUN: %clang -x c-header %s -o %t.clang.h.pch -fmodules -fmodules-cache-path=%t.mcp -Xclang -detailed-preprocessing-record -target x86_64-apple-darwin -Xclang -fallow-pch-with-compiler-errors -Xclang -verify
+// RUN: c-index-test -test-load-source local %s -include %t.clang.h -fmodules -fmodules-cache-path=%t.mcp -target x86_64-apple-darwin | FileCheck %s
 
 #ifndef HEADER
 #define HEADER


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38354.116972.patch
Type: text/x-patch
Size: 1729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170928/b674af9e/attachment-0001.bin>


More information about the cfe-commits mailing list