[llvm] r232408 - Verifier: Remove unnecessary double-checks
Duncan P. N. Exon Smith
dexonsmith at apple.com
Mon Mar 16 13:24:02 PDT 2015
Author: dexonsmith
Date: Mon Mar 16 15:24:02 2015
New Revision: 232408
URL: http://llvm.org/viewvc/llvm-project?rev=232408&view=rev
Log:
Verifier: Remove unnecessary double-checks
Turns out `visitIntrinsicFunctionCall()` descends into all operands
already, so explicitly descending in `visitDbgIntrinsic()` (part of
r232296) isn't useful.
Updating a testcase that doesn't really need `-verify-debug-info` (since
r231082) as confirmation.
Modified:
llvm/trunk/lib/IR/Verifier.cpp
llvm/trunk/test/DebugInfo/piece-verifier.ll
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=232408&r1=232407&r2=232408&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Mon Mar 16 15:24:02 2015
@@ -3030,10 +3030,6 @@ void Verifier::visitDbgIntrinsic(StringR
Assert(isa<MDExpression>(DII.getRawExpression()),
"invalid llvm.dbg." + Kind + " intrinsic expression", &DII,
DII.getRawExpression());
-
- // Don't call visitMDNode(), since that will recurse through operands.
- visitMDLocalVariable(*DII.getVariable());
- visitMDExpression(*DII.getExpression());
}
void DebugInfoVerifier::verifyDebugInfo() {
Modified: llvm/trunk/test/DebugInfo/piece-verifier.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/piece-verifier.ll?rev=232408&r1=232407&r2=232408&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/piece-verifier.ll (original)
+++ llvm/trunk/test/DebugInfo/piece-verifier.ll Mon Mar 16 15:24:02 2015
@@ -1,4 +1,4 @@
-; RUN: not llvm-as -disable-output -verify-debug-info < %s 2>&1 | FileCheck %s
+; RUN: not llvm-as -disable-output < %s 2>&1 | FileCheck %s
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
@@ -50,5 +50,7 @@ attributes #1 = { nounwind readnone }
!24 = !MDExpression(DW_OP_deref, DW_OP_bit_piece, 0, 64)
!25 = !{}
; This expression has elements after DW_OP_bit_piece.
-; CHECK: DIExpression does not Verify
+; CHECK: invalid expression
+; CHECK-NEXT: !MDExpression({{[0-9]+}}, 64, 32, {{[0-9]+}})
+; CHECK-NOT: invalid expression
!27 = !MDExpression(DW_OP_bit_piece, 64, 32, DW_OP_deref)
More information about the llvm-commits
mailing list