summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2015-11-12 15:36:04 +0000
committerJames Molloy <james.molloy@arm.com>2015-11-12 15:36:04 +0000
commitc16a60b63e49d4ee8a054c0df54793aacd336289 (patch)
treebb6faf00712affbba06810b9d856f925564b0520 /clang/test/CodeGenObjC
parentc744e120f601955b20f84273e2d770b6c054f45d (diff)
downloadbcm5719-llvm-c16a60b63e49d4ee8a054c0df54793aacd336289.tar.gz
bcm5719-llvm-c16a60b63e49d4ee8a054c0df54793aacd336289.zip
[C++] Add the "norecurse" attribute to main() if in C++ mode
The C++ spec (3.6.1.3) says "The function `main` shall not be used within a program". This implies that it cannot recurse, so add the norecurse attribute to help the midend out a bit. llvm-svn: 252902
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/objc-literal-tests.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjC/objc-literal-tests.m b/clang/test/CodeGenObjC/objc-literal-tests.m
index c53ee644f05..03286e24563 100644
--- a/clang/test/CodeGenObjC/objc-literal-tests.m
+++ b/clang/test/CodeGenObjC/objc-literal-tests.m
@@ -94,4 +94,4 @@ void baz(void) {
bar(^(void) { return YES; });
}
-// CHECK: attributes [[NUW]] = { nounwind{{.*}} }
+// CHECK: attributes [[NUW]] = { {{(norecurse )?}}nounwind{{.*}} }
OpenPOWER on IntegriCloud