Some ProfileInfo cleanups.
- Part of optimal static profiling patch sequence by Andreas Neustifter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78485 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/ProfileInfo.cpp b/lib/Analysis/ProfileInfo.cpp
index 670d4e7..2ed466b 100644
--- a/lib/Analysis/ProfileInfo.cpp
+++ b/lib/Analysis/ProfileInfo.cpp
@@ -64,6 +64,7 @@
}
double ProfileInfo::getExecutionCount(const Function *F) {
+ if (F->isDeclaration()) return MissingValue;
std::map<const Function*, double>::iterator J =
FunctionInformation.find(F);
if (J != FunctionInformation.end())