[clang] 3f5fc73 - [test][ARM][CMSE] Use clang_cc1 in arm_cmse.h tests

Hubert Tong via cfe-commits cfe-commits at lists.llvm.org
Fri May 15 14:34:12 PDT 2020


Author: Hubert Tong
Date: 2020-05-15T17:34:00-04:00
New Revision: 3f5fc73a9d52fc7f128dc4e53ccc63b88fc44fb6

URL: https://github.com/llvm/llvm-project/commit/3f5fc73a9d52fc7f128dc4e53ccc63b88fc44fb6
DIFF: https://github.com/llvm/llvm-project/commit/3f5fc73a9d52fc7f128dc4e53ccc63b88fc44fb6.diff

LOG: [test][ARM][CMSE] Use clang_cc1 in arm_cmse.h tests

Summary:
The `arm_cmse.h` header includes standard headers, but some tests that
include this header explicitly specify a target. The standard headers
found via the standard include paths need not be compatible with the
explicitly-specified target from the tests. In order to avoid test
failures caused by such incompatibility, this patch uses `%clang_cc1`,
which doesn't pick up the host system headers.

Reviewed By: chill

Differential Revision: https://reviews.llvm.org/D79693

Added: 
    

Modified: 
    clang/test/CodeGen/arm-cmse-nonsecure.c
    clang/test/CodeGen/arm-cmse-secure.c

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGen/arm-cmse-nonsecure.c b/clang/test/CodeGen/arm-cmse-nonsecure.c
index 2a483a71f593..c0b33f50ee88 100644
--- a/clang/test/CodeGen/arm-cmse-nonsecure.c
+++ b/clang/test/CodeGen/arm-cmse-nonsecure.c
@@ -1,5 +1,5 @@
-// RUN: %clang  -mlittle-endian -target thumbv8m.base-eabi  -emit-llvm -S -o - %s | FileCheck %s
-// RUN: %clang  -mbig-endian    -target thumbv8m.base-eabi  -emit-llvm -S -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbv8m.base-unknown-unknown-eabi   -emit-llvm -mrelocation-model static -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbebv8m.base-unknown-unknown-eabi -emit-llvm -mrelocation-model static -o - %s | FileCheck %s
 
 #include <arm_cmse.h>
 

diff  --git a/clang/test/CodeGen/arm-cmse-secure.c b/clang/test/CodeGen/arm-cmse-secure.c
index 716887254e57..da60f2ed9294 100644
--- a/clang/test/CodeGen/arm-cmse-secure.c
+++ b/clang/test/CodeGen/arm-cmse-secure.c
@@ -1,5 +1,5 @@
-// RUN: %clang -mlittle-endian -mcmse -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
-// RUN: %clang -mbig-endian    -mcmse -target thumbv8m.base-eabi -emit-llvm -S -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbv8m.base-unknown-unknown-eabi   -emit-llvm -mrelocation-model static -mcmse -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbebv8m.base-unknown-unknown-eabi -emit-llvm -mrelocation-model static -mcmse -o - %s | FileCheck %s
 
 #include <arm_cmse.h>
 


        


More information about the cfe-commits mailing list