summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-22 06:22:13 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-22 06:22:13 +0000
commit13332ee51858594b8c02a67de10340ee52a7374e (patch)
tree23305521c18fa5b311e86b7b75a7498ffc7a8ddf /clang/test/CodeGenCXX/member-function-pointer-calls.cpp
parent213d05304e4416eabf66f13d36ca98a675f30e44 (diff)
downloadbcm5719-llvm-13332ee51858594b8c02a67de10340ee52a7374e.tar.gz
bcm5719-llvm-13332ee51858594b8c02a67de10340ee52a7374e.zip
Relax the FileCheck assertions in this test a touch. Previously the test
relied on an artifact of how the inliner and subsequent passes in clang's -O3 mode happen to treat basic blocks and the labels for the basic blocks. In my work on the inliner, and changed this fundamental assumption, and the label that was being checked on the entry basic block will no longer appear in opt builds. There was no reason to expect the label to always be present anyways, much to my regret. I've changed the test to just ensure that we return an immediate constant. If there are intervening instructions, that's bad, but not really that relevant to the test. I'd love it if others have a better way of checking that a function body contains only a 'ret' instruction that isn't dependent on whether or not the entry block receives a label... llvm-svn: 153243
Diffstat (limited to 'clang/test/CodeGenCXX/member-function-pointer-calls.cpp')
-rw-r--r--clang/test/CodeGenCXX/member-function-pointer-calls.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/member-function-pointer-calls.cpp b/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
index 6f0ef81fe35..f8960aac52e 100644
--- a/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
+++ b/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
@@ -9,16 +9,14 @@ int f(A* a, int (A::*fp)()) {
}
// CHECK: define i32 @_Z2g1v()
-// CHECK-NEXT: {{.*}}:
-// CHECK-NEXT: ret i32 1
+// CHECK: ret i32 1
int g1() {
A a;
return f(&a, &A::vf1);
}
// CHECK: define i32 @_Z2g2v()
-// CHECK-NEXT: {{.*}}:
-// CHECK-NEXT: ret i32 2
+// CHECK: ret i32 2
int g2() {
A a;
return f(&a, &A::vf2);
OpenPOWER on IntegriCloud