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

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 11 10:03:56 PDT 2018


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 at 0@finally_with_func@@"({{[^)]*}})
+// CHECK: call void @cleanup_with_func(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @"??_C at _0BC@COAGBPGM at finally_with_func?$AA@", i32 0, i32 0))
+
----------------
smeenai wrote:
> How stable is the mangling here? I included the complete `call` instruction because I wanted to ensure that the value of `__func__` inside a `__finally` block reflects the parent function, not the outlined funclet, and both the `[18 x i8]` and the mangled string name are pretty good proxies for that. I can generalize it more if it'll make the test more reliable though.
It's pretty stable.


Repository:
  rC Clang

https://reviews.llvm.org/D45523





More information about the cfe-commits mailing list