Remove static global GCNames from Function.cpp and move it to the Context
[oota-llvm.git] / include / llvm / Analysis / EHPersonalities.h
index 8d5f0f20349682f2bfbf00ee8c4dff55ebb11d28..59e9672b88e594bcc12166b6d1639342cb510ba0 100644 (file)
@@ -7,12 +7,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_ANALYSIS_LIBCALLSEMANTICS_H
-#define LLVM_ANALYSIS_LIBCALLSEMANTICS_H
+#ifndef LLVM_ANALYSIS_EHPERSONALITIES_H
+#define LLVM_ANALYSIS_EHPERSONALITIES_H
 
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/TinyPtrVector.h"
 #include "llvm/Support/ErrorHandling.h"
 
 namespace llvm {
+class BasicBlock;
 class Function;
 class Value;
 
@@ -78,6 +81,14 @@ inline bool isNoOpWithoutInvoke(EHPersonality Pers) {
 
 bool canSimplifyInvokeNoUnwind(const Function *F);
 
+typedef TinyPtrVector<BasicBlock *> ColorVector;
+
+/// \brief If an EH funclet personality is in use (see isFuncletEHPersonality),
+/// this will recompute which blocks are in which funclet. It is possible that
+/// some blocks are in multiple funclets. Consider this analysis to be
+/// expensive.
+DenseMap<BasicBlock *, ColorVector> colorEHFunclets(Function &F);
+
 } // end namespace llvm
 
 #endif