r190670 - CHECK -> CHECK-DAG
David Majnemer
david.majnemer at gmail.com
Fri Sep 13 01:59:20 PDT 2013
Author: majnemer
Date: Fri Sep 13 03:59:19 2013
New Revision: 190670
URL: http://llvm.org/viewvc/llvm-project?rev=190670&view=rev
Log:
CHECK -> CHECK-DAG
Modified:
cfe/trunk/test/CodeGenCXX/mangle-ms.cpp
Modified: cfe/trunk/test/CodeGenCXX/mangle-ms.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-ms.cpp?rev=190670&r1=190669&r2=190670&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-ms.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-ms.cpp Fri Sep 13 03:59:19 2013
@@ -1,78 +1,51 @@
// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=x86_64-pc-win32 | FileCheck -check-prefix X64 %s
-// CHECK: @"\01?a@@3HA"
-// CHECK: @"\01?b at N@@3HA"
-// CHECK: @"\01?anonymous@?A at N@@3HA"
-// CHECK: @c
-// CHECK: @"\01?d at foo@@0FB"
-// CHECK: @"\01?e at foo@@1JC"
-// CHECK: @"\01?f at foo@@2DD"
-// CHECK: @"\01?g at bar@@2HA"
-// CHECK: @"\01?h1@@3QAHA"
-// CHECK: @"\01?h2@@3QBHB"
-// CHECK: @"\01?i@@3PAY0BE at HA"
-// CHECK: @"\01?j@@3P6GHCE at ZA"
-// CHECK: @"\01?k@@3PTfoo@@DT1@"
-// X64: @"\01?k@@3PETfoo@@DET1@"
-// CHECK: @"\01?l@@3P8foo@@AEHH at ZQ1@"
-// CHECK: @"\01?color1@@3PANA"
-// CHECK: @"\01?color2@@3QBNB"
-// CHECK: @"\01?color3@@3QAY02$$CBNA"
-// CHECK: @"\01?color4@@3QAY02$$CBNA"
-// X64: @"\01?memptr1@@3RESB@@HES1@"
-// X64: @"\01?memptr2@@3PESB@@HES1@"
-// X64: @"\01?memptr3@@3REQB@@HEQ1@"
-// X64: @"\01?funmemptr1@@3RESB@@R6AHXZES1@"
-// X64: @"\01?funmemptr2@@3PESB@@R6AHXZES1@"
-// X64: @"\01?funmemptr3@@3REQB@@P6AHXZEQ1@"
-// X64: @"\01?memptrtofun1@@3R8B@@EAAXXZEQ1@"
-// X64: @"\01?memptrtofun2@@3P8B@@EAAXXZEQ1@"
-// X64: @"\01?memptrtofun3@@3P8B@@EAAXXZEQ1@"
-// X64: @"\01?memptrtofun4@@3R8B@@EAAHXZEQ1@"
-// X64: @"\01?memptrtofun5@@3P8B@@EAA?CHXZEQ1@"
-// X64: @"\01?memptrtofun6@@3P8B@@EAA?BHXZEQ1@"
-// X64: @"\01?memptrtofun7@@3R8B@@EAAP6AHXZXZEQ1@"
-// X64: @"\01?memptrtofun8@@3P8B@@EAAR6AHXZXZEQ1@"
-// X64: @"\01?memptrtofun9@@3P8B@@EAAQ6AHXZXZEQ1@"
-
int a;
+// CHECK-DAG: @"\01?a@@3HA"
namespace N {
int b;
+// CHECK-DAG: @"\01?b at N@@3HA"
namespace {
int anonymous;
+// CHECK-DAG: @"\01?anonymous@?A at N@@3HA"
}
}
static int c;
+// CHECK-DAG: @c
+
int _c(void) {return N::anonymous + c;}
-// CHECK: @"\01?_c@@YAHXZ"
-// X64: @"\01?_c@@YAHXZ"
+// CHECK-DAG: @"\01?_c@@YAHXZ"
+// X64-DAG: @"\01?_c@@YAHXZ"
class foo {
static const short d;
+// CHECK-DAG: @"\01?d at foo@@0FB"
protected:
static volatile long e;
+// CHECK-DAG: @"\01?e at foo@@1JC"
public:
static const volatile char f;
+// CHECK-DAG: @"\01?f at foo@@2DD"
int operator+(int a);
foo(){}
-//CHECK: @"\01??0foo@@QAE at XZ"
-//X64: @"\01??0foo@@QEAA at XZ"
+// CHECK-DAG: @"\01??0foo@@QAE at XZ"
+// X64-DAG: @"\01??0foo@@QEAA at XZ"
~foo(){}
-//CHECK: @"\01??1foo@@QAE at XZ"
-//X64: @"\01??1foo@@QEAA at XZ
+// CHECK-DAG: @"\01??1foo@@QAE at XZ"
+// X64-DAG: @"\01??1foo@@QEAA at XZ
foo(int i){}
-//CHECK: @"\01??0foo@@QAE at H@Z"
-//X64: @"\01??0foo@@QEAA at H@Z"
+// CHECK-DAG: @"\01??0foo@@QAE at H@Z"
+// X64-DAG: @"\01??0foo@@QEAA at H@Z"
foo(char *q){}
-//CHECK: @"\01??0foo@@QAE at PAD@Z"
-//X64: @"\01??0foo@@QEAA at PEAD@Z"
+// CHECK-DAG: @"\01??0foo@@QAE at PAD@Z"
+// X64-DAG: @"\01??0foo@@QEAA at PEAD@Z"
static foo* static_method() { return 0; }
@@ -97,16 +70,16 @@ enum quux {
};
foo bar() { return foo(); }
-//CHECK: @"\01?bar@@YA?AVfoo@@XZ"
-//X64: @"\01?bar@@YA?AVfoo@@XZ"
+// CHECK-DAG: @"\01?bar@@YA?AVfoo@@XZ"
+// X64-DAG: @"\01?bar@@YA?AVfoo@@XZ"
int foo::operator+(int a) {
-//CHECK: @"\01??Hfoo@@QAEHH at Z"
-//X64: @"\01??Hfoo@@QEAAHH at Z"
+// CHECK-DAG: @"\01??Hfoo@@QAEHH at Z"
+// X64-DAG: @"\01??Hfoo@@QEAAHH at Z"
foo::static_method();
-//CHECK: @"\01?static_method at foo@@SAPAV1 at XZ"
-//X64: @"\01?static_method at foo@@SAPEAV1 at XZ"
+// CHECK-DAG: @"\01?static_method at foo@@SAPAV1 at XZ"
+// X64-DAG: @"\01?static_method at foo@@SAPEAV1 at XZ"
bar();
return a;
}
@@ -116,130 +89,157 @@ volatile long foo::e;
const volatile char foo::f = 'C';
int bar::g;
+// CHECK-DAG: @"\01?g at bar@@2HA"
extern int * const h1 = &a;
+// CHECK-DAG: @"\01?h1@@3QAHA"
extern const int * const h2 = &a;
+// CHECK-DAG: @"\01?h2@@3QBHB"
int i[10][20];
+// CHECK-DAG: @"\01?i@@3PAY0BE at HA"
int (__stdcall *j)(signed char, unsigned char);
+// CHECK-DAG: @"\01?j@@3P6GHCE at ZA"
const volatile char foo2::*k;
+// CHECK-DAG: @"\01?k@@3PTfoo@@DT1@"
+// X64-DAG: @"\01?k@@3PETfoo@@DET1@"
int (foo2::*l)(int);
+// CHECK-DAG: @"\01?l@@3P8foo@@AEHH at ZQ1@"
// Static functions are mangled, too.
// Also make sure calling conventions, arglists, and throw specs work.
static void __stdcall alpha(float a, double b) throw() {}
bool __fastcall beta(long long a, wchar_t b) throw(signed char, unsigned char) {
-// CHECK: @"\01?beta@@YI_N_J_W at Z"
-// X64: @"\01?beta@@YA_N_J_W at Z"
+// CHECK-DAG: @"\01?beta@@YI_N_J_W at Z"
+// X64-DAG: @"\01?beta@@YA_N_J_W at Z"
alpha(0.f, 0.0);
return false;
}
-// CHECK: @"\01?alpha@@YGXMN at Z"
-// X64: @"\01?alpha@@YAXMN at Z"
+// CHECK-DAG: @"\01?alpha@@YGXMN at Z"
+// X64-DAG: @"\01?alpha@@YAXMN at Z"
// Make sure tag-type mangling works.
void gamma(class foo, struct bar, union baz, enum quux) {}
-// CHECK: @"\01?gamma@@YAXVfoo@@Ubar@@Tbaz@@W4quux@@@Z"
-// X64: @"\01?gamma@@YAXVfoo@@Ubar@@Tbaz@@W4quux@@@Z"
+// CHECK-DAG: @"\01?gamma@@YAXVfoo@@Ubar@@Tbaz@@W4quux@@@Z"
+// X64-DAG: @"\01?gamma@@YAXVfoo@@Ubar@@Tbaz@@W4quux@@@Z"
// Make sure pointer/reference-type mangling works.
void delta(int * const a, const long &) {}
-// CHECK: @"\01?delta@@YAXQAHABJ at Z"
-// X64: @"\01?delta@@YAXQEAHAEBJ at Z"
+// CHECK-DAG: @"\01?delta@@YAXQAHABJ at Z"
+// X64-DAG: @"\01?delta@@YAXQEAHAEBJ at Z"
// Array mangling.
void epsilon(int a[][10][20]) {}
-// CHECK: @"\01?epsilon@@YAXQAY19BE at H@Z"
-// X64: @"\01?epsilon@@YAXQEAY19BE at H@Z"
+// CHECK-DAG: @"\01?epsilon@@YAXQAY19BE at H@Z"
+// X64-DAG: @"\01?epsilon@@YAXQEAY19BE at H@Z"
void zeta(int (*)(int, int)) {}
-// CHECK: @"\01?zeta@@YAXP6AHHH at Z@Z"
-// X64: @"\01?zeta@@YAXP6AHHH at Z@Z"
+// CHECK-DAG: @"\01?zeta@@YAXP6AHHH at Z@Z"
+// X64-DAG: @"\01?zeta@@YAXP6AHHH at Z@Z"
// Blocks mangling (Clang extension). A block should be mangled slightly
// differently from a similar function pointer.
void eta(int (^)(int, int)) {}
-// CHECK: @"\01?eta@@YAXP_EAHHH at Z@Z"
+// CHECK-DAG: @"\01?eta@@YAXP_EAHHH at Z@Z"
typedef int theta_arg(int,int);
void theta(theta_arg^ block) {}
-// CHECK: @"\01?theta@@YAXP_EAHHH at Z@Z"
+// CHECK-DAG: @"\01?theta@@YAXP_EAHHH at Z@Z"
void operator_new_delete() {
char *ptr = new char;
-// CHECK: @"\01??2 at YAPAXI@Z"
+// CHECK-DAG: @"\01??2 at YAPAXI@Z"
delete ptr;
-// CHECK: @"\01??3 at YAXPAX@Z"
+// CHECK-DAG: @"\01??3 at YAXPAX@Z"
char *array = new char[42];
-// CHECK: @"\01??_U at YAPAXI@Z"
+// CHECK-DAG: @"\01??_U at YAPAXI@Z"
delete [] array;
-// CHECK: @"\01??_V at YAXPAX@Z"
+// CHECK-DAG: @"\01??_V at YAXPAX@Z"
}
// PR13022
void (redundant_parens)();
void redundant_parens_use() { redundant_parens(); }
-// CHECK: @"\01?redundant_parens@@YAXXZ"
-// X64: @"\01?redundant_parens@@YAXXZ"
+// CHECK-DAG: @"\01?redundant_parens@@YAXXZ"
+// X64-DAG: @"\01?redundant_parens@@YAXXZ"
// PR13047
typedef double RGB[3];
RGB color1;
+// CHECK-DAG: @"\01?color1@@3PANA"
extern const RGB color2 = {};
+// CHECK-DAG: @"\01?color2@@3QBNB"
extern RGB const color3[5] = {};
+// CHECK-DAG: @"\01?color3@@3QAY02$$CBNA"
extern RGB const ((color4)[5]) = {};
+// CHECK-DAG: @"\01?color4@@3QAY02$$CBNA"
struct B;
volatile int B::* volatile memptr1;
+// X64-DAG: @"\01?memptr1@@3RESB@@HES1@"
volatile int B::* memptr2;
+// X64-DAG: @"\01?memptr2@@3PESB@@HES1@"
int B::* volatile memptr3;
+// X64-DAG: @"\01?memptr3@@3REQB@@HEQ1@"
typedef int (*fun)();
volatile fun B::* volatile funmemptr1;
+// X64-DAG: @"\01?funmemptr1@@3RESB@@R6AHXZES1@"
volatile fun B::* funmemptr2;
+// X64-DAG: @"\01?funmemptr2@@3PESB@@R6AHXZES1@"
fun B::* volatile funmemptr3;
+// X64-DAG: @"\01?funmemptr3@@3REQB@@P6AHXZEQ1@"
void (B::* volatile memptrtofun1)();
+// X64-DAG: @"\01?memptrtofun1@@3R8B@@EAAXXZEQ1@"
const void (B::* memptrtofun2)();
+// X64-DAG: @"\01?memptrtofun2@@3P8B@@EAAXXZEQ1@"
volatile void (B::* memptrtofun3)();
+// X64-DAG: @"\01?memptrtofun3@@3P8B@@EAAXXZEQ1@"
int (B::* volatile memptrtofun4)();
+// X64-DAG: @"\01?memptrtofun4@@3R8B@@EAAHXZEQ1@"
volatile int (B::* memptrtofun5)();
+// X64-DAG: @"\01?memptrtofun5@@3P8B@@EAA?CHXZEQ1@"
const int (B::* memptrtofun6)();
+// X64-DAG: @"\01?memptrtofun6@@3P8B@@EAA?BHXZEQ1@"
fun (B::* volatile memptrtofun7)();
+// X64-DAG: @"\01?memptrtofun7@@3R8B@@EAAP6AHXZXZEQ1@"
volatile fun (B::* memptrtofun8)();
+// X64-DAG: @"\01?memptrtofun8@@3P8B@@EAAR6AHXZXZEQ1@"
const fun (B::* memptrtofun9)();
+// X64-DAG: @"\01?memptrtofun9@@3P8B@@EAAQ6AHXZXZEQ1@"
// PR12603
enum E {};
-// CHECK: "\01?fooE@@YA?AW4E@@XZ"
-// X64: "\01?fooE@@YA?AW4E@@XZ"
+// CHECK-DAG: "\01?fooE@@YA?AW4E@@XZ"
+// X64-DAG: "\01?fooE@@YA?AW4E@@XZ"
E fooE() { return E(); }
class X {};
-// CHECK: "\01?fooX@@YA?AVX@@XZ"
-// X64: "\01?fooX@@YA?AVX@@XZ"
+// CHECK-DAG: "\01?fooX@@YA?AVX@@XZ"
+// X64-DAG: "\01?fooX@@YA?AVX@@XZ"
X fooX() { return X(); }
namespace PR13182 {
extern char s0[];
- // CHECK: @"\01?s0 at PR13182@@3PADA"
+ // CHECK-DAG: @"\01?s0 at PR13182@@3PADA"
extern char s1[42];
- // CHECK: @"\01?s1 at PR13182@@3PADA"
+ // CHECK-DAG: @"\01?s1 at PR13182@@3PADA"
extern const char s2[];
- // CHECK: @"\01?s2 at PR13182@@3QBDB"
+ // CHECK-DAG: @"\01?s2 at PR13182@@3QBDB"
extern const char s3[42];
- // CHECK: @"\01?s3 at PR13182@@3QBDB"
+ // CHECK-DAG: @"\01?s3 at PR13182@@3QBDB"
extern volatile char s4[];
- // CHECK: @"\01?s4 at PR13182@@3RCDC"
+ // CHECK-DAG: @"\01?s4 at PR13182@@3RCDC"
extern const volatile char s5[];
- // CHECK: @"\01?s5 at PR13182@@3SDDD"
+ // CHECK-DAG: @"\01?s5 at PR13182@@3SDDD"
extern const char* const* s6;
- // CHECK: @"\01?s6 at PR13182@@3PBQBDB"
+ // CHECK-DAG: @"\01?s6 at PR13182@@3PBQBDB"
char foo() {
return s0[0] + s1[0] + s2[0] + s3[0] + s4[0] + s5[0] + s6[0][0];
More information about the cfe-commits
mailing list