From 85866b2a28d944f929b65de92ed9fc5aea035006 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 31 Mar 2015 01:28:58 +0000 Subject: Verifier: Check reference flags in debug info Move over checks of `&` and `&&` flags. llvm-svn: 233658 --- llvm/lib/IR/DebugInfo.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'llvm/lib/IR/DebugInfo.cpp') 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(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(DbgNode); - return N && !(isLValueReference() && isRValueReference()); -} +bool DICompositeType::Verify() const { return isCompositeType(); } bool DISubprogram::Verify() const { auto *N = dyn_cast_or_null(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()) { -- cgit v1.2.3