debug intrinsics do not go in the callgraph, this fixes a couple

clang regtest failures.

llvm-svn: 80724
This commit is contained in:
Chris Lattner 2009-09-01 21:37:50 +00:00
parent c82555fb85
commit 6190bb01be
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include "llvm/PassManagers.h" #include "llvm/PassManagers.h"
#include "llvm/Function.h" #include "llvm/Function.h"
#include "llvm/Support/Debug.h" #include "llvm/Support/Debug.h"
#include "llvm/IntrinsicInst.h"
#include "llvm/Support/raw_ostream.h" #include "llvm/Support/raw_ostream.h"
using namespace llvm; using namespace llvm;
@ -192,7 +193,7 @@ void CGPassManager::RefreshCallGraph(std::vector<CallGraphNode*> &CurSCC,
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) { for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
CallSite CS = CallSite::get(I); CallSite CS = CallSite::get(I);
if (!CS.getInstruction()) continue; if (!CS.getInstruction() || isa<DbgInfoIntrinsic>(I)) continue;
// If this call site already existed in the callgraph, just verify it // If this call site already existed in the callgraph, just verify it
// matches up to expectations and remove it from CallSites. // matches up to expectations and remove it from CallSites.