[PATCH] D45523: [CodeGen] Handle __func__ inside __finally

2018-04-11 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329836: [CodeGen] Handle __func__ inside __finally (authored by smeenai, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D45523 Files:

[PATCH] D45523: [CodeGen] Handle __func__ inside __finally

2018-04-11 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm, thanks! Comment at: test/CodeGen/exceptions-seh-finally.c:281 +// CHECK-LABEL: define internal void @"?fin$0@0@finally_with_func@@"({{[^)]*}}) +// CHECK: call void

[PATCH] D45523: [CodeGen] Handle __func__ inside __finally

2018-04-11 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added inline comments. Comment at: test/CodeGen/exceptions-seh-finally.c:281 +// CHECK-LABEL: define internal void @"?fin$0@0@finally_with_func@@"({{[^)]*}}) +// CHECK: call void @cleanup_with_func(i8* getelementptr inbounds ([18 x i8], [18 x i8]*

[PATCH] D45523: [CodeGen] Handle __func__ inside __finally

2018-04-11 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: compnerd, majnemer, rnk. When we enter a __finally block, the CGF's CurCodeDecl will be null (because CodeGenFunction::StartFunction is given an empty GlobalDecl for a __finally block), and so the dyn_cast here will result in an assertion