diff options
Diffstat (limited to 'include/llvm/IR/Function.h')
| -rw-r--r-- | include/llvm/IR/Function.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h index 75fccc135dae..e811ae5e215a 100644 --- a/include/llvm/IR/Function.h +++ b/include/llvm/IR/Function.h @@ -30,7 +30,6 @@ #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/GlobalObject.h" #include "llvm/IR/GlobalValue.h" -#include "llvm/IR/Intrinsics.h" #include "llvm/IR/OperandTraits.h" #include "llvm/IR/SymbolTableListTraits.h" #include "llvm/IR/Value.h" @@ -44,6 +43,10 @@ namespace llvm { +namespace Intrinsic { +enum ID : unsigned; +} + class AssemblyAnnotationWriter; class Constant; class DISubprogram; @@ -125,6 +128,11 @@ public: void operator=(const Function&) = delete; ~Function(); + // This is here to help easily convert from FunctionT * (Function * or + // MachineFunction *) in BlockFrequencyInfoImpl to Function * by calling + // FunctionT->getFunction(). + const Function &getFunction() const { return *this; } + static Function *Create(FunctionType *Ty, LinkageTypes Linkage, const Twine &N = "", Module *M = nullptr) { return new Function(Ty, Linkage, N, M); @@ -414,7 +422,7 @@ public: } void setOnlyAccessesArgMemory() { addFnAttr(Attribute::ArgMemOnly); } - /// @brief Determine if the function may only access memory that is + /// @brief Determine if the function may only access memory that is /// inaccessible from the IR. bool onlyAccessesInaccessibleMemory() const { return hasFnAttribute(Attribute::InaccessibleMemOnly); @@ -482,7 +490,7 @@ public: } void setDoesNotRecurse() { addFnAttr(Attribute::NoRecurse); - } + } /// @brief True if the ABI mandates (or the user requested) that this /// function be in a unwind table. |
