None of the __llvm_* functions call into the program. This makes the
callgraph MUCH simpler for eh using program.
llvm-svn: 9825
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp
index 7c0dedd..5ee3d3c 100644
--- a/llvm/lib/Analysis/IPA/CallGraph.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraph.cpp
@@ -165,6 +165,9 @@
std::sort(Funcs.begin(), Funcs.end());
}
+ if (Name.size() > 7 && !memcmp("__llvm_", Name.c_str(), 7))
+ return true;
+
// Binary search for the function name...
std::vector<std::string>::iterator I =
std::lower_bound(Funcs.begin(), Funcs.end(), Name);