mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
Verifier: Check operands of MDType subclasses and MDCompileUnit
Add verify checks for `MDType` subclasses and for `MDCompileUnit`. These new checks don't yet incorporate everything from `Verify()`, but at least they sanity check the operands. Also downcast accessors as possible. A lot of these accessors can't be downcast as far as we'd like because of arrays of typed objects (stored in a generic `MDTuple`) and `MDString`-based type references. Eventually I'll port over `DIRef<>` and `DITypedArray<>` from `DebugInfo.h` to clean those up as well. Updated bitrotted testcases separately in r233415 and r233443 to reduce churn on the off-chance this needs to be reverted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233446 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -269,8 +269,8 @@ DIDerivedType DIBuilder::createReferenceType(unsigned Tag, DIType RTy) {
|
||||
|
||||
DIDerivedType DIBuilder::createTypedef(DIType Ty, StringRef Name, DIFile File,
|
||||
unsigned LineNo, DIDescriptor Context) {
|
||||
return MDDerivedType::get(VMContext, dwarf::DW_TAG_typedef, Name,
|
||||
File.getFileNode(), LineNo,
|
||||
return MDDerivedType::get(VMContext, dwarf::DW_TAG_typedef, Name, File,
|
||||
LineNo,
|
||||
DIScope(getNonCompileUnitScope(Context)).getRef(),
|
||||
Ty.getRef(), 0, 0, 0, 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user