[llvm] r228655 - Verifier: reuse getInlinedAt() result, NFC

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Feb 9 18:25:18 PST 2015


Author: dexonsmith
Date: Mon Feb  9 20:25:18 2015
New Revision: 228655

URL: http://llvm.org/viewvc/llvm-project?rev=228655&view=rev
Log:
Verifier: reuse getInlinedAt() result, NFC

Modified:
    llvm/trunk/lib/IR/Verifier.cpp

Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=228655&r1=228654&r2=228655&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Mon Feb  9 20:25:18 2015
@@ -680,9 +680,8 @@ void Verifier::visitMetadataAsValue(cons
 
 void Verifier::visitMDLocation(const MDLocation &N) {
   Assert1(N.getScope(), "location requires a valid scope", &N);
-  if (N.getInlinedAt())
-    Assert2(isa<MDLocation>(N.getInlinedAt()),
-            "inlined-at should be a location", &N, N.getInlinedAt());
+  if (auto *IA = N.getInlinedAt())
+    Assert2(isa<MDLocation>(IA), "inlined-at should be a location", &N, IA);
 }
 
 void Verifier::visitGenericDebugNode(const GenericDebugNode &N) {





More information about the llvm-commits mailing list