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
- Build Status
Buildable 2213 Build 2213: arc lint + arc unit
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 | 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 |
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 ↗ | (On Diff #81715) | Minor typo: "return false if an" |
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?