[PATCH] D36797: [Verifier] Avoid visiting DIGlobalVariables twice

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 04:33:28 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL311081: [Verifier] Avoid visiting DIGlobalVariables twice. (authored by davide).

Changed prior to commit:
  https://reviews.llvm.org/D36797?vs=111361&id=111497#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36797

Files:
  llvm/trunk/lib/IR/Verifier.cpp
  llvm/trunk/test/DebugInfo/pr34186.ll


Index: llvm/trunk/test/DebugInfo/pr34186.ll
===================================================================
--- llvm/trunk/test/DebugInfo/pr34186.ll
+++ llvm/trunk/test/DebugInfo/pr34186.ll
@@ -1,5 +1,7 @@
+; Make sure we reject GVs without a type and we verify each exactly once.
 ; RUN: not llc %s 2>&1 | FileCheck %s
 ; CHECK: missing global variable type
+; CHECK-NOT: missing global variable type
 
 !llvm.dbg.cu = !{!2}
 !llvm.module.flags = !{!63, !64}
Index: llvm/trunk/lib/IR/Verifier.cpp
===================================================================
--- llvm/trunk/lib/IR/Verifier.cpp
+++ llvm/trunk/lib/IR/Verifier.cpp
@@ -1173,8 +1173,6 @@
 void Verifier::visitDIGlobalVariableExpression(
     const DIGlobalVariableExpression &GVE) {
   AssertDI(GVE.getVariable(), "missing variable");
-  if (auto *Var = GVE.getVariable())
-    visitDIGlobalVariable(*Var);
   if (auto *Expr = GVE.getExpression())
     visitDIExpression(*Expr);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36797.111497.patch
Type: text/x-patch
Size: 956 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170817/ee5d543b/attachment.bin>


More information about the llvm-commits mailing list