diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:19:57 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-07-13 17:19:57 +0000 |
commit | 9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74 (patch) | |
tree | 9de1c5f67a98cd0e73c60838396486c984f63ac2 /test/FrontendC++ | |
parent | 1e3dec662ea18131c495db50caccc57f77b7a5fe (diff) | |
download | FreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.zip FreeBSD-src-9112829d76cbb8e0c8ef51bbc2d7d1be48cd7b74.tar.gz |
Update LLVM to r108243.
Diffstat (limited to 'test/FrontendC++')
-rw-r--r-- | test/FrontendC++/2010-02-17-DbgArtificialArg.cpp | 4 | ||||
-rw-r--r-- | test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp | 5 | ||||
-rw-r--r-- | test/FrontendC++/2010-06-21-LocalVarDbg.cpp | 13 | ||||
-rw-r--r-- | test/FrontendC++/2010-06-22-BitfieldInit.cpp | 20 | ||||
-rw-r--r-- | test/FrontendC++/2010-06-22-ZeroBitfield.cpp | 5 | ||||
-rw-r--r-- | test/FrontendC++/thunk-linkonce-odr.cpp (renamed from test/FrontendC++/thunk-weak-odr.cpp) | 8 |
6 files changed, 48 insertions, 7 deletions
diff --git a/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp b/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp index 2a9f1f1..ff45412 100644 --- a/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp +++ b/test/FrontendC++/2010-02-17-DbgArtificialArg.cpp @@ -1,4 +1,4 @@ -// RUN: %llvmgcc -g -S %s -o - | grep DW_TAG_pointer_type | grep "i32 524303, metadata .., metadata ..., metadata .., i32 ., i64 .., i64 .., i64 0, i32 64, metadata ..." +// RUN: %llvmgcc -g -S %s -o - | FileCheck %s // Here, second to last argument "i32 64" indicates that artificial type is set. // Test to artificial attribute attahed to "this" pointer type. // Radar 7655792 and 7655002 @@ -10,5 +10,7 @@ public: int foo() { A a; + // Matching "i32 64, metadata !<number>} ; [ DW_TAG_pointer_type ]" + // CHECK: i32 64, metadata {{![0-9]+\} ; \[ DW_TAG_pointer_type \]}} return a.fn1(1); } diff --git a/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp b/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp index dc9b16c..7052dc0 100644 --- a/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp +++ b/test/FrontendC++/2010-04-30-OptimizedMethod-Dbg.cpp @@ -1,5 +1,4 @@ -// RUN: %llvmgcc -g -S -O2 %s -o %t -// RUN: grep "i1 false, i1 true. . . DW_TAG_subprogram" %t | count 2 +// RUN: %llvmgcc -g -S -O2 %s -o - | FileCheck %s class foo { public: @@ -8,10 +7,12 @@ public: }; int foo::bar(int x) { + // CHECK: {{i1 false, i1 true(, i[0-9]+ [^\}]+[}]|[}]) ; \[ DW_TAG_subprogram \]}} return x*4 + 1; } int foo::baz(int x) { + // CHECK: {{i1 false, i1 true(, i[0-9]+ [^\},]+[}]|[}]) ; \[ DW_TAG_subprogram \]}} return x*4 + 1; } diff --git a/test/FrontendC++/2010-06-21-LocalVarDbg.cpp b/test/FrontendC++/2010-06-21-LocalVarDbg.cpp new file mode 100644 index 0000000..48d8215 --- /dev/null +++ b/test/FrontendC++/2010-06-21-LocalVarDbg.cpp @@ -0,0 +1,13 @@ +// RUN: %llvmgxx -g -Os -S %s -o - | llvm-as -disable-output +// Do not use function name to create named metadata used to hold +// local variable info. For example. llvm.dbg.lv.~A is an invalid name. +class A { +public: + ~A() { int i = 0; i++; } +}; + +int foo(int i) { + A a; + return 0; +} + diff --git a/test/FrontendC++/2010-06-22-BitfieldInit.cpp b/test/FrontendC++/2010-06-22-BitfieldInit.cpp new file mode 100644 index 0000000..1cfe1f9 --- /dev/null +++ b/test/FrontendC++/2010-06-22-BitfieldInit.cpp @@ -0,0 +1,20 @@ +// RUN: %llvmgxx -g -c %s +struct TEST2 +{ + int subid:32; + int :0; +}; + +typedef struct _TEST3 +{ + TEST2 foo; + TEST2 foo2; +} TEST3; + +TEST3 test = + { + {0}, + {0} + }; + +int main() { return 0; } diff --git a/test/FrontendC++/2010-06-22-ZeroBitfield.cpp b/test/FrontendC++/2010-06-22-ZeroBitfield.cpp new file mode 100644 index 0000000..c979f8d --- /dev/null +++ b/test/FrontendC++/2010-06-22-ZeroBitfield.cpp @@ -0,0 +1,5 @@ +// RUN: %llvmgxx -g -c %s +struct s8_0 { unsigned : 0; }; +struct s8_1 { double x; }; +struct s8 { s8_0 a; s8_1 b; }; +s8 f8() { return s8(); } diff --git a/test/FrontendC++/thunk-weak-odr.cpp b/test/FrontendC++/thunk-linkonce-odr.cpp index 1d9d4dd..ad72e64 100644 --- a/test/FrontendC++/thunk-weak-odr.cpp +++ b/test/FrontendC++/thunk-linkonce-odr.cpp @@ -1,5 +1,5 @@ // RUN: %llvmgxx %s -S -o - | FileCheck %s -// <rdar://problem/7929157> +// <rdar://problem/7929157> & <rdar://problem/8104369> struct A { virtual int f() { return 1; } @@ -27,7 +27,7 @@ int g() { return f(&d); } -// Thunks should be marked as "weak ODR", not just "weak". +// Thunks should be marked as "linkonce ODR" not "weak". // -// CHECK: define weak_odr i32 @_ZThn{{[48]}}_N1C1fEv -// CHECK: define weak_odr i32 @_ZThn{{[48]}}_N1D1fEv +// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1C1fEv +// CHECK: define linkonce_odr i32 @_ZThn{{[48]}}_N1D1fEv |