aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 026c160221..71ec90a9f2 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -35,6 +35,7 @@
#include "llvm/Support/DataTypes.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/UniqueVector.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/GlobalValue.h"
#include "llvm/Pass.h"
@@ -1037,6 +1038,10 @@ private:
// common EH frames.
std::vector<Function *> Personalities;
+ // UsedFunctions - the functions in the llvm.used list in a more easily
+ // searchable format.
+ SmallPtrSet<const Function *, 32> UsedFunctions;
+
bool CallsEHReturn;
bool CallsUnwindInit;
public:
@@ -1235,6 +1240,11 @@ public:
return Personalities;
}
+ // UsedFunctions - Return set of the functions in the llvm.used list.
+ const SmallPtrSet<const Function *, 32>& getUsedFunctions() const {
+ return UsedFunctions;
+ }
+
/// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
///
void addCatchTypeInfo(MachineBasicBlock *LandingPad,