summaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/ProfileInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/ProfileInfo.h')
-rw-r--r--include/llvm/Analysis/ProfileInfo.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/llvm/Analysis/ProfileInfo.h b/include/llvm/Analysis/ProfileInfo.h
index 300a027..6c2e273 100644
--- a/include/llvm/Analysis/ProfileInfo.h
+++ b/include/llvm/Analysis/ProfileInfo.h
@@ -22,6 +22,7 @@
#define LLVM_ANALYSIS_PROFILEINFO_H
#include "llvm/Support/Debug.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
@@ -85,13 +86,11 @@ namespace llvm {
// getFunction() - Returns the Function for an Edge, checking for validity.
static const FType* getFunction(Edge e) {
- if (e.first) {
+ if (e.first)
return e.first->getParent();
- } else if (e.second) {
+ if (e.second)
return e.second->getParent();
- }
- assert(0 && "Invalid ProfileInfo::Edge");
- return (const FType*)0;
+ llvm_unreachable("Invalid ProfileInfo::Edge");
}
// getEdge() - Creates an Edge from two BasicBlocks.
OpenPOWER on IntegriCloud