From: Chris Lattner Date: Tue, 1 Sep 2009 21:37:50 +0000 (+0000) Subject: debug intrinsics do not go in the callgraph, this fixes a couple X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=8bff7c960c0e52258158edcbb96cfe528f335f34;p=oota-llvm.git debug intrinsics do not go in the callgraph, this fixes a couple clang regtest failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80724 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp index b188d3091c8..85f22c7bd42 100644 --- a/lib/Analysis/IPA/CallGraphSCCPass.cpp +++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp @@ -22,6 +22,7 @@ #include "llvm/PassManagers.h" #include "llvm/Function.h" #include "llvm/Support/Debug.h" +#include "llvm/IntrinsicInst.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; @@ -192,7 +193,7 @@ void CGPassManager::RefreshCallGraph(std::vector &CurSCC, for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) { CallSite CS = CallSite::get(I); - if (!CS.getInstruction()) continue; + if (!CS.getInstruction() || isa(I)) continue; // If this call site already existed in the callgraph, just verify it // matches up to expectations and remove it from CallSites.