[PATCH] D61547: Disallow llvm.global_ctors and llvm.global_dtors of the 2-field form
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 6 11:04:02 PDT 2019
rnk added a comment.
I'm concerned that this will break most frontends for LLVM, and I don't recall ever making any attempt to document this in the release notes or do any kind of outreach at all. LLVM doesn't promise API stability, so in some ways this is normal, but this is more surprising because it may lead to harder to understand runtime errors, especially if the verifier is disabled.
Can you turn the old auto-upgrade test into a verifier test that checks for an improved diagnostic? I think that would strike the right balance between removing legacy and not needlessly breaking people.
================
Comment at: lib/IR/Verifier.cpp:647
STy->getTypeAtIndex(1) == FuncPtrTy,
"wrong type for intrinsic global variable", &GV);
+ Type *ETy = STy->getTypeAtIndex(2);
----------------
Please improve this diagnostic since it is very likely to be the first time frontend authors find out about the third field.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61547/new/
https://reviews.llvm.org/D61547
More information about the llvm-commits
mailing list