Index: test/lit.common.cfg =================================================================== --- test/lit.common.cfg +++ test/lit.common.cfg @@ -76,6 +76,9 @@ # Define CHECK-%os to check for OS-dependent output. config.substitutions.append( ('CHECK-%os', ("CHECK-" + config.host_os))) +# Define CHECK-%arch to check for architecture-dependent output. +config.substitutions.append( ('CHECK-%arch', ("CHECK-" + config.host_arch))) + # Add supported compiler_rt architectures to a list of available features. compiler_rt_arch = getattr(config, 'compiler_rt_arch', None) if compiler_rt_arch: Index: test/ubsan/TestCases/TypeCheck/misaligned.cpp =================================================================== --- test/ubsan/TestCases/TypeCheck/misaligned.cpp +++ test/ubsan/TestCases/TypeCheck/misaligned.cpp @@ -10,7 +10,7 @@ // RUN: UBSAN_OPTIONS=print_stacktrace=1 %run %t l1 2>&1 | FileCheck %s --check-prefix=CHECK-LOAD --check-prefix=CHECK-%os-STACK-LOAD // RUN: %clangxx -fsanitize=alignment -fno-sanitize-recover %s -O3 -o %t -// RUN: not %run %t w1 2>&1 | FileCheck %s --check-prefix=CHECK-WILD +// RUN: not %run %t w1 2>&1 | FileCheck %s --check-prefix=CHECK-%arch-WILD // XFAIL: armv7l-unknown-linux-gnueabihf #include @@ -97,9 +97,12 @@ } case 'w': - // CHECK-WILD: misaligned.cpp:[[@LINE+3]]:35: runtime error: member access within misaligned address 0x000000000123 for type 'S', which requires 4 byte alignment - // CHECK-WILD-NEXT: 0x000000000123: note: pointer points here - // CHECK-WILD-NEXT: + // CHECK-x86_64-WILD: misaligned.cpp:[[@LINE+3]]:35: runtime error: member access within misaligned address 0x000000000123 for type 'S', which requires 4 byte alignment + // CHECK-x86_64-WILD-NEXT: 0x000000000123: note: pointer points here + // CHECK-x86_64-WILD-NEXT: + // CHECK-mips64-WILD: misaligned.cpp:[[@LINE+3]]:35: runtime error: member access within misaligned address 0x0000000123 for type 'S', which requires 4 byte alignment + // CHECK-mips64-WILD-NEXT: 0x0000000123: note: pointer points here + // CHECK-mips64-WILD-NEXT: return static_cast(wild)->k; } }