From d1a210f4d07f61ed0d81f87f5d66735e4a0ead87 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Thu, 31 Mar 2016 16:22:17 +0000 Subject: [PATCH] Minor code cleanup /NFC llvm-svn: 265025 --- lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index c8f6bb2b709..50a65b98bfe 100644 --- a/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -333,11 +333,13 @@ struct PGOIndirectCallSiteVisitor PGOIndirectCallSiteVisitor() {} void visitCallSite(CallSite CS) { - Instruction *I = CS.getInstruction(); - CallInst *CI = dyn_cast(I); - if (CS.getCalledFunction() || !CS.getCalledValue() || - (CI && CI->isInlineAsm())) + if (CS.getCalledFunction() || !CS.getCalledValue()) return; + Instruction *I = CS.getInstruction(); + if (CallInst *CI = dyn_cast(I)) { + if (CI->isInlineAsm()) + return; + } IndirectCallInsts.push_back(I); } };