[cfe-commits] r166551 - in /cfe/trunk/test: CodeGen/ CodeGenCXX/ CodeGenObjC/ Frontend/
Ulrich Weigand
ulrich.weigand at de.ibm.com
Wed Oct 24 05:22:56 PDT 2012
Author: uweigand
Date: Wed Oct 24 07:22:56 2012
New Revision: 166551
URL: http://llvm.org/viewvc/llvm-project?rev=166551&view=rev
Log:
A number of test cases assume that an "int" parameter or return value
will be represented in the IR as a plain "i32" type. This causes the
tests to spuriously fail on platforms where int is not a 32-bit type,
or where the ABI requires attributes like "signext" or "zeroext" to
be used.
This patch adds -triple or -target parameters to force those tests
to use the i386-unknown-unknown target.
Modified:
cfe/trunk/test/CodeGen/PR3589-freestanding-libcalls.c
cfe/trunk/test/CodeGen/decl-in-prototype.c
cfe/trunk/test/CodeGen/extern-inline.c
cfe/trunk/test/CodeGen/inline.c
cfe/trunk/test/CodeGen/unwind-attr.c
cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
cfe/trunk/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
cfe/trunk/test/CodeGenCXX/cxx0x-initializer-array.cpp
cfe/trunk/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp
cfe/trunk/test/CodeGenCXX/mangle-extern-local.cpp
cfe/trunk/test/CodeGenCXX/member-init-assignment.cpp
cfe/trunk/test/CodeGenCXX/nrvo.cpp
cfe/trunk/test/CodeGenCXX/pr12251.cpp
cfe/trunk/test/CodeGenCXX/pragma-visibility.cpp
cfe/trunk/test/CodeGenCXX/switch-case-folding-2.cpp
cfe/trunk/test/CodeGenCXX/thunk-linkonce-odr.cpp
cfe/trunk/test/CodeGenCXX/virtual-operator-call.cpp
cfe/trunk/test/CodeGenCXX/visibility-inlines-hidden.cpp
cfe/trunk/test/CodeGenObjC/property.m
cfe/trunk/test/Frontend/ast-codegen.c
Modified: cfe/trunk/test/CodeGen/PR3589-freestanding-libcalls.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/PR3589-freestanding-libcalls.c?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/PR3589-freestanding-libcalls.c (original)
+++ cfe/trunk/test/CodeGen/PR3589-freestanding-libcalls.c Wed Oct 24 07:22:56 2012
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1
-// RUN: %clang_cc1 -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1
-// RUN: %clang_cc1 -ffreestanding -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 0
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1
+// RUN: %clang_cc1 -triple i386-unknown-unknown -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1
+// RUN: %clang_cc1 -triple i386-unknown-unknown -ffreestanding -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 0
int printf(const char *, ...);
Modified: cfe/trunk/test/CodeGen/decl-in-prototype.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/decl-in-prototype.c?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/decl-in-prototype.c (original)
+++ cfe/trunk/test/CodeGen/decl-in-prototype.c Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s
+// RUN: %clang -target i386-unknown-unknown -emit-llvm -S -o - %s | FileCheck %s
const int AA = 5;
Modified: cfe/trunk/test/CodeGen/extern-inline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/extern-inline.c?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/extern-inline.c (original)
+++ cfe/trunk/test/CodeGen/extern-inline.c Wed Oct 24 07:22:56 2012
@@ -1,5 +1,5 @@
-// RUN: %clang -S -emit-llvm -std=gnu89 -o - %s | FileCheck %s
-// RUN: %clang -S -emit-llvm -fgnu89-inline -o - %s | FileCheck %s
+// RUN: %clang -target i386-unknown-unknown -S -emit-llvm -std=gnu89 -o - %s | FileCheck %s
+// RUN: %clang -target i386-unknown-unknown -S -emit-llvm -fgnu89-inline -o - %s | FileCheck %s
// PR5253
// If an extern inline function is redefined, functions should call the
Modified: cfe/trunk/test/CodeGen/inline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/inline.c?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/inline.c (original)
+++ cfe/trunk/test/CodeGen/inline.c Wed Oct 24 07:22:56 2012
@@ -1,5 +1,5 @@
// RUN: echo "GNU89 tests:"
-// RUN: %clang %s -O1 -emit-llvm -S -o %t -std=gnu89
+// RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o %t -std=gnu89
// RUN: grep "define available_externally i32 @ei()" %t
// RUN: grep "define i32 @foo()" %t
// RUN: grep "define i32 @bar()" %t
@@ -21,7 +21,7 @@
// RUN: grep "define void @testC" %t
// RUN: echo "C99 tests:"
-// RUN: %clang %s -O1 -emit-llvm -S -o %t -std=gnu99
+// RUN: %clang %s -target i386-unknown-unknown -O1 -emit-llvm -S -o %t -std=gnu99
// RUN: grep "define i32 @ei()" %t
// RUN: grep "define available_externally i32 @foo()" %t
// RUN: grep "define i32 @bar()" %t
@@ -43,7 +43,7 @@
// RUN: grep "define void @testC" %t
// RUN: echo "C++ tests:"
-// RUN: %clang -x c++ %s -O1 -emit-llvm -S -o %t -std=c++98
+// RUN: %clang -x c++ %s -target i386-unknown-unknown -O1 -emit-llvm -S -o %t -std=c++98
// RUN: grep "define linkonce_odr i32 @_Z2eiv()" %t
// RUN: grep "define linkonce_odr i32 @_Z3foov()" %t
// RUN: grep "define i32 @_Z3barv()" %t
Modified: cfe/trunk/test/CodeGen/unwind-attr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/unwind-attr.c?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/unwind-attr.c (original)
+++ cfe/trunk/test/CodeGen/unwind-attr.c Wed Oct 24 07:22:56 2012
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fexceptions -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s
int opaque();
Modified: cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fexceptions -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fexceptions -emit-llvm %s -o - | FileCheck %s
int c(void) __attribute__((const));
int p(void) __attribute__((pure));
int t(void);
Modified: cfe/trunk/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx0x-delegating-ctors.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/cxx0x-delegating-ctors.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/cxx0x-delegating-ctors.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fexceptions -fcxx-exceptions -std=c++11 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -fexceptions -fcxx-exceptions -std=c++11 -o - %s | FileCheck %s
struct non_trivial {
non_trivial();
Modified: cfe/trunk/test/CodeGenCXX/cxx0x-initializer-array.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/cxx0x-initializer-array.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/cxx0x-initializer-array.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/cxx0x-initializer-array.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -std=c++11 -S -emit-llvm -o - %s | FileCheck %s
struct A { int a[1]; };
typedef A x[];
Modified: cfe/trunk/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -std=c++11 %s -emit-llvm -o - | FileCheck %s
namespace Test1 {
struct A {
Modified: cfe/trunk/test/CodeGenCXX/mangle-extern-local.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-extern-local.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-extern-local.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-extern-local.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
// CHECK: @var1 = external global i32
// CHECK: @_ZN1N4var2E = external global i32
Modified: cfe/trunk/test/CodeGenCXX/member-init-assignment.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/member-init-assignment.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/member-init-assignment.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/member-init-assignment.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
// PR7291
struct Foo {
Modified: cfe/trunk/test/CodeGenCXX/nrvo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/nrvo.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/nrvo.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/nrvo.cpp Wed Oct 24 07:22:56 2012
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm -O1 -o - %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -O1 -fcxx-exceptions -fexceptions -o - %s | FileCheck --check-prefix=CHECK-EH %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -fcxx-exceptions -fexceptions -o - %s | FileCheck --check-prefix=CHECK-EH %s
// Test code generation for the named return value optimization.
class X {
Modified: cfe/trunk/test/CodeGenCXX/pr12251.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/pr12251.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/pr12251.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/pr12251.cpp Wed Oct 24 07:22:56 2012
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -emit-llvm -O1 -relaxed-aliasing -fstrict-enums -std=c++11 -o - | FileCheck %s
-// RUN: %clang_cc1 %s -emit-llvm -O1 -relaxed-aliasing -std=c++11 -o - | FileCheck --check-prefix=NO-STRICT-ENUMS %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -O1 -relaxed-aliasing -fstrict-enums -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -O1 -relaxed-aliasing -std=c++11 -o - | FileCheck --check-prefix=NO-STRICT-ENUMS %s
bool f(bool *x) {
return *x;
Modified: cfe/trunk/test/CodeGenCXX/pragma-visibility.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/pragma-visibility.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/pragma-visibility.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/pragma-visibility.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
#pragma GCC visibility push(hidden)
struct x {
Modified: cfe/trunk/test/CodeGenCXX/switch-case-folding-2.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/switch-case-folding-2.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/switch-case-folding-2.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/switch-case-folding-2.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// CHECK that we don't crash.
extern int printf(const char*, ...);
Modified: cfe/trunk/test/CodeGenCXX/thunk-linkonce-odr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/thunk-linkonce-odr.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/thunk-linkonce-odr.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/thunk-linkonce-odr.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
// <rdar://problem/7929157> & <rdar://problem/8104369>
struct A {
Modified: cfe/trunk/test/CodeGenCXX/virtual-operator-call.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/virtual-operator-call.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/virtual-operator-call.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/virtual-operator-call.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
struct A {
virtual int operator-() = 0;
Modified: cfe/trunk/test/CodeGenCXX/visibility-inlines-hidden.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/visibility-inlines-hidden.cpp?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/visibility-inlines-hidden.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/visibility-inlines-hidden.cpp Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fvisibility-inlines-hidden -emit-llvm -o - %s -O2 -disable-llvm-optzns | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fvisibility-inlines-hidden -emit-llvm -o - %s -O2 -disable-llvm-optzns | FileCheck %s
// The trickery with optimization in the run line is to get IR
// generation to emit available_externally function bodies, but not
Modified: cfe/trunk/test/CodeGenObjC/property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/property.m?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/property.m (original)
+++ cfe/trunk/test/CodeGenObjC/property.m Wed Oct 24 07:22:56 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
// PR13820
// REQUIRES: LP64
Modified: cfe/trunk/test/Frontend/ast-codegen.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/ast-codegen.c?rev=166551&r1=166550&r2=166551&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/ast-codegen.c (original)
+++ cfe/trunk/test/Frontend/ast-codegen.c Wed Oct 24 07:22:56 2012
@@ -1,5 +1,5 @@
-// RUN: %clang -emit-ast -o %t.ast %s
-// RUN: %clang -emit-llvm -S -o - %t.ast | FileCheck %s
+// RUN: %clang -target i386-unknown-unknown -emit-ast -o %t.ast %s
+// RUN: %clang -target i386-unknown-unknown -emit-llvm -S -o - %t.ast | FileCheck %s
// CHECK: module asm "foo"
__asm__("foo");
More information about the cfe-commits
mailing list