summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-27 23:05:04 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-27 23:05:04 +0000
commit53855f05d315ccfbdc14d0ef2230b008a8e44adc (patch)
tree092e3039f9dc7366982f99b185da72ef0029f8a1 /llvm/lib/IR/DIBuilder.cpp
parentd9ccfb9e0160dc91afafc665b45c1121cc20302c (diff)
downloadbcm5719-llvm-53855f05d315ccfbdc14d0ef2230b008a8e44adc.tar.gz
bcm5719-llvm-53855f05d315ccfbdc14d0ef2230b008a8e44adc.zip
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. llvm-svn: 233446
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 4b837af9d44..dfbc1315218 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -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);
}
OpenPOWER on IntegriCloud