================
@@ -1655,6 +1655,15 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD,
llvm::Function *Fn,
PGO->verifyCounterMap();
+ if (CurCodeDecl->hasAttr<PersonalityAttr>()) {
+ StringRef Identifier =
+ CurCodeDecl->getAttr<PersonalityAttr>()->getRoutine()->getName();
+ llvm::FunctionCallee PersonalityRoutine =
+ CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty, true),
----------------
erichkeane wrote:
This ends up being kinda problematic if we're creating this as a function, if
the function already exists and we don't match function type (particularly if
it would be generated after this).
I think we need to do some sort of defense here against someone defining this
with what seems like a matching function, and not getting it.
Alternatively, why is this a 'return int' and 'takes variadic', rather than a
stricter type? It isn't clear form the documentation that this is what we
expect out of a personality, or what we expect it to look like.
https://github.com/llvm/llvm-project/pull/185225
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits