diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-31 01:28:58 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-31 01:28:58 +0000 |
commit | 85866b2a28d944f929b65de92ed9fc5aea035006 (patch) | |
tree | d7efc03010a1707c83e977652c6f7698e90f2f3b /llvm/lib/IR/DebugInfo.cpp | |
parent | 94d58f88801833c1d8d1bbc3d3f4244be9e2348d (diff) | |
download | bcm5719-llvm-85866b2a28d944f929b65de92ed9fc5aea035006.tar.gz bcm5719-llvm-85866b2a28d944f929b65de92ed9fc5aea035006.zip |
Verifier: Check reference flags in debug info
Move over checks of `&` and `&&` flags.
llvm-svn: 233658
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 91823773212..9381a5b580e 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -252,32 +252,16 @@ static bool isDescriptorRef(const Metadata *MD) { } #endif -bool DIType::Verify() const { - auto *N = dyn_cast_or_null<MDType>(DbgNode); - if (!N) - return false; - - if (isCompositeType()) - return DICompositeType(DbgNode).Verify(); - return true; -} - +bool DIType::Verify() const { return isType(); } bool DIBasicType::Verify() const { return isBasicType(); } bool DIDerivedType::Verify() const { return isDerivedType(); } - -bool DICompositeType::Verify() const { - auto *N = dyn_cast_or_null<MDCompositeTypeBase>(DbgNode); - return N && !(isLValueReference() && isRValueReference()); -} +bool DICompositeType::Verify() const { return isCompositeType(); } bool DISubprogram::Verify() const { auto *N = dyn_cast_or_null<MDSubprogram>(DbgNode); if (!N) return false; - if (isLValueReference() && isRValueReference()) - return false; - // If a DISubprogram has an llvm::Function*, then scope chains from all // instructions within the function should lead to this DISubprogram. if (auto *F = getFunction()) { |