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.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 1872bd26d8..3618898a79 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -112,8 +112,9 @@ private:
// common EH frames.
std::vector<Function *> Personalities;
- // UsedFunctions - the functions in the llvm.used list in a more easily
- // searchable format.
+ /// UsedFunctions - The functions in the @llvm.used list in a more easily
+ /// searchable format. This does not include the functions in
+ /// llvm.compiler.used.
SmallPtrSet<const Function *, 32> UsedFunctions;
/// UsedDbgLabels - labels are used by debug info entries.
@@ -240,9 +241,11 @@ public:
return Personalities;
}
- // UsedFunctions - Return set of the functions in the llvm.used list.
- const SmallPtrSet<const Function *, 32>& getUsedFunctions() const {
- return UsedFunctions;
+ /// isUsedFunction - Return true if the functions in the llvm.used list. This
+ /// does not return true for things in llvm.compiler.used unless they are also
+ /// in llvm.used.
+ bool isUsedFunction(const Function *F) {
+ return UsedFunctions.count(F);
}
/// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.