This is intended to be used (in a later patch) by the BitcodeReader
to detect invalid TBAA and drop them when loading bitcode, so that
we don't break client that have legacy bitcode with possible invalid
TBAA.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
The patch was partial (I didn't squash properly before), here is the full one (hopefully)
Mostly: it is moving the code outside of the anonymous namespace and grouping it in its own class, but yes the body of the function is unchanged, except that visitTBAAMetadata also returns a boolean now (ignored by the verifier).
I didn't upload the full patch before (didn't squash the early refactoring), you may want to look again.
lgtm but with one nit inline
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
4472 ↗ | (On Diff #81708) | I assume you'll add a this->HasFailed = true type thing here later? Also, I'd mildly prefer using this->Diagnostic instead of Diagnostic, since this is in a macro. Actually, why is this a macro at all? Can't it be a normal templated function just like VerifierSupport::CheckFailed? |
llvm/lib/IR/Verifier.cpp | ||
---|---|---|
4472 ↗ | (On Diff #81708) |
Not in my plan? I expect to always return false (from the AssertTBAA macro on invalid). I sent you D27839 so you can see how it is used in the Reader.
Good point! Done. |
llvm/trunk/include/llvm/IR/Verifier.h | ||
---|---|---|
68 | Minor typo: "return false if an" |
Minor typo: "return false if an"