[PATCH] Work-in-progress omnibus patch for native Windows C++ EH outlining
Andy Kaylor
andrew.kaylor at intel.com
Wed Feb 25 14:55:12 PST 2015
REPOSITORY
rL LLVM
================
Comment at: lib/CodeGen/WinEHPrepare.cpp:705-714
@@ -390,1 +704,12 @@
+ Function *Handler;
+ if (CatchOrCleanup == Catch) {
+ FunctionType *FnType = FunctionType::get(Int8PtrType, ArgTys, false);
+ Handler = Function::Create(FnType, GlobalVariable::ExternalLinkage,
+ SrcFn->getName() + ".catch", M);
+ } else {
+ FunctionType *FnType =
+ FunctionType::get(Type::getVoidTy(Context), ArgTys, false);
+ Handler = Function::Create(FnType, GlobalVariable::ExternalLinkage,
+ SrcFn->getName() + ".cleanup", M);
+ }
----------------
majnemer wrote:
> I'm guessing we are not going to want to always give them `ExternalLinkage` but I guess we can fix that later. Perhaps we should have a TODO?
That's a good point. I'm not sure I know all the implications of the various linkage options, but it sounds like PrivateLinkage is probably what we want here.
http://reviews.llvm.org/D7886
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list