[cfe-commits] r165329 - in /cfe/trunk/test: CodeGen/microsoft-call-conv-x64.c Sema/MicrosoftCompatibility-x86.c Sema/stdcall-fastcall-x64.c

Aaron Ballman aaron at aaronballman.com
Fri Oct 5 12:46:33 PDT 2012


Author: aaronballman
Date: Fri Oct  5 14:46:32 2012
New Revision: 165329

URL: http://llvm.org/viewvc/llvm-project?rev=165329&view=rev
Log:
Changing line endings from Windows to Unix.  No functional changes.

Modified:
    cfe/trunk/test/CodeGen/microsoft-call-conv-x64.c
    cfe/trunk/test/Sema/MicrosoftCompatibility-x86.c
    cfe/trunk/test/Sema/stdcall-fastcall-x64.c

Modified: cfe/trunk/test/CodeGen/microsoft-call-conv-x64.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/microsoft-call-conv-x64.c?rev=165329&r1=165328&r2=165329&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/microsoft-call-conv-x64.c (original)
+++ cfe/trunk/test/CodeGen/microsoft-call-conv-x64.c Fri Oct  5 14:46:32 2012
@@ -1,39 +1,39 @@
-// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm < %s | FileCheck %s
-
-void __fastcall f1(void);
-void __stdcall f2(void);
-void __fastcall f4(void) {
-// CHECK: define void @f4()
-  f1();
-// CHECK: call void @f1()
-}
-void __stdcall f5(void) {
-// CHECK: define void @f5()
-  f2();
-// CHECK: call void @f2()
-}
-
-// PR5280
-void (__fastcall *pf1)(void) = f1;
-void (__stdcall *pf2)(void) = f2;
-void (__fastcall *pf4)(void) = f4;
-void (__stdcall *pf5)(void) = f5;
-
-int main(void) {
-    f4(); f5();
-    // CHECK: call void @f4()
-    // CHECK: call void @f5()
-    pf1(); pf2(); pf4(); pf5();
-    // CHECK: call void %{{.*}}()
-    // CHECK: call void %{{.*}}()
-    // CHECK: call void %{{.*}}()
-    // CHECK: call void %{{.*}}()
-    return 0;
-}
-
-// PR7117
-void __stdcall f7(foo) int foo; {}
-void f8(void) {
-  f7(0);
-  // CHECK: call void @f7(i32 0)
-}
+// RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm < %s | FileCheck %s
+
+void __fastcall f1(void);
+void __stdcall f2(void);
+void __fastcall f4(void) {
+// CHECK: define void @f4()
+  f1();
+// CHECK: call void @f1()
+}
+void __stdcall f5(void) {
+// CHECK: define void @f5()
+  f2();
+// CHECK: call void @f2()
+}
+
+// PR5280
+void (__fastcall *pf1)(void) = f1;
+void (__stdcall *pf2)(void) = f2;
+void (__fastcall *pf4)(void) = f4;
+void (__stdcall *pf5)(void) = f5;
+
+int main(void) {
+    f4(); f5();
+    // CHECK: call void @f4()
+    // CHECK: call void @f5()
+    pf1(); pf2(); pf4(); pf5();
+    // CHECK: call void %{{.*}}()
+    // CHECK: call void %{{.*}}()
+    // CHECK: call void %{{.*}}()
+    // CHECK: call void %{{.*}}()
+    return 0;
+}
+
+// PR7117
+void __stdcall f7(foo) int foo; {}
+void f8(void) {
+  f7(0);
+  // CHECK: call void @f7(i32 0)
+}

Modified: cfe/trunk/test/Sema/MicrosoftCompatibility-x86.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/MicrosoftCompatibility-x86.c?rev=165329&r1=165328&r2=165329&view=diff
==============================================================================
--- cfe/trunk/test/Sema/MicrosoftCompatibility-x86.c (original)
+++ cfe/trunk/test/Sema/MicrosoftCompatibility-x86.c Fri Oct  5 14:46:32 2012
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility -triple i386-pc-win32
-int __stdcall f(void); /* expected-note {{previous declaration is here}} */
-
-int __cdecl f(void) { /* expected-error {{function declared 'cdecl' here was previously declared 'stdcall'}} */
-  return 0;
-}
+// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility -triple i386-pc-win32
+int __stdcall f(void); /* expected-note {{previous declaration is here}} */
+
+int __cdecl f(void) { /* expected-error {{function declared 'cdecl' here was previously declared 'stdcall'}} */
+  return 0;
+}

Modified: cfe/trunk/test/Sema/stdcall-fastcall-x64.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/stdcall-fastcall-x64.c?rev=165329&r1=165328&r2=165329&view=diff
==============================================================================
--- cfe/trunk/test/Sema/stdcall-fastcall-x64.c (original)
+++ cfe/trunk/test/Sema/stdcall-fastcall-x64.c Fri Oct  5 14:46:32 2012
@@ -1,20 +1,20 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-pc-linux-gnu %s
-
-// CC qualifier can be applied only to functions
-int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' only applies to function types; type here is 'int'}}
-int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' only applies to function types; type here is 'int'}}
-
-// Different CC qualifiers are not compatible
-void __attribute__((stdcall, fastcall)) foo3(void); // expected-warning{{calling convention 'stdcall' ignored for this target}} expected-warning {{calling convention 'fastcall' ignored for this target}}
-void __attribute__((stdcall)) foo4(); // expected-warning{{calling convention 'stdcall' ignored for this target}}
-void __attribute__((fastcall)) foo4(void); // expected-warning {{calling convention 'fastcall' ignored for this target}}
-
-// rdar://8876096
-void rdar8876096foo1(int i, int j) __attribute__((fastcall, cdecl)); // expected-warning{{calling convention 'fastcall' ignored for this target}}
-void rdar8876096foo2(int i, int j) __attribute__((fastcall, stdcall)); // expected-warning{{calling convention 'stdcall' ignored for this target}} expected-warning {{calling convention 'fastcall' ignored for this target}}
-void rdar8876096foo3(int i, int j) __attribute__((fastcall, regparm(2))); // expected-warning {{calling convention 'fastcall' ignored for this target}}
-void rdar8876096foo4(int i, int j) __attribute__((stdcall, cdecl)); // expected-warning{{calling convention 'stdcall' ignored for this target}}
-void rdar8876096foo5(int i, int j) __attribute__((stdcall, fastcall)); // expected-warning{{calling convention 'stdcall' ignored for this target}} expected-warning {{calling convention 'fastcall' ignored for this target}}
-void rdar8876096foo6(int i, int j) __attribute__((cdecl, fastcall)); // expected-warning {{calling convention 'fastcall' ignored for this target}}
-void rdar8876096foo7(int i, int j) __attribute__((cdecl, stdcall)); // expected-warning{{calling convention 'stdcall' ignored for this target}}
-void rdar8876096foo8(int i, int j) __attribute__((regparm(2), fastcall)); // expected-warning {{calling convention 'fastcall' ignored for this target}}
+// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-pc-linux-gnu %s
+
+// CC qualifier can be applied only to functions
+int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' only applies to function types; type here is 'int'}}
+int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' only applies to function types; type here is 'int'}}
+
+// Different CC qualifiers are not compatible
+void __attribute__((stdcall, fastcall)) foo3(void); // expected-warning{{calling convention 'stdcall' ignored for this target}} expected-warning {{calling convention 'fastcall' ignored for this target}}
+void __attribute__((stdcall)) foo4(); // expected-warning{{calling convention 'stdcall' ignored for this target}}
+void __attribute__((fastcall)) foo4(void); // expected-warning {{calling convention 'fastcall' ignored for this target}}
+
+// rdar://8876096
+void rdar8876096foo1(int i, int j) __attribute__((fastcall, cdecl)); // expected-warning{{calling convention 'fastcall' ignored for this target}}
+void rdar8876096foo2(int i, int j) __attribute__((fastcall, stdcall)); // expected-warning{{calling convention 'stdcall' ignored for this target}} expected-warning {{calling convention 'fastcall' ignored for this target}}
+void rdar8876096foo3(int i, int j) __attribute__((fastcall, regparm(2))); // expected-warning {{calling convention 'fastcall' ignored for this target}}
+void rdar8876096foo4(int i, int j) __attribute__((stdcall, cdecl)); // expected-warning{{calling convention 'stdcall' ignored for this target}}
+void rdar8876096foo5(int i, int j) __attribute__((stdcall, fastcall)); // expected-warning{{calling convention 'stdcall' ignored for this target}} expected-warning {{calling convention 'fastcall' ignored for this target}}
+void rdar8876096foo6(int i, int j) __attribute__((cdecl, fastcall)); // expected-warning {{calling convention 'fastcall' ignored for this target}}
+void rdar8876096foo7(int i, int j) __attribute__((cdecl, stdcall)); // expected-warning{{calling convention 'stdcall' ignored for this target}}
+void rdar8876096foo8(int i, int j) __attribute__((regparm(2), fastcall)); // expected-warning {{calling convention 'fastcall' ignored for this target}}





More information about the cfe-commits mailing list