[PATCH] D15599: [CodeGen] Fix a crash that occurs when attribute "naked" is attached to a c++ member function

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 15 11:44:26 PDT 2016


ahatanak marked 2 inline comments as done.

================
Comment at: test/CodeGen/attr-naked.c:20
@@ -19,3 +19,3 @@
 __attribute((naked)) void t3(int x) {
-// CHECK: define void @t3(i32)
+// CHECK: define void @t3(i32 %x)
 // CHECK-NOT: alloca
----------------
This is a side effect of not exiting early in CodeGenFunction::EmitFunctionProlog.

================
Comment at: test/CodeGenCXX/attr-naked.cpp:8
@@ +7,3 @@
+// CHECK-NEXT: unreachable
+// CHECK-NEXT: }
+
----------------
I've also added a check to make sure the thunk isn't marked naked.


http://reviews.llvm.org/D15599





More information about the cfe-commits mailing list