summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineFunction.h
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2012-08-22 06:07:19 +0000
committerCraig Topper <craig.topper@gmail.com>2012-08-22 06:07:19 +0000
commit96601ca332ab388754ca4673be8973396fea2ddd (patch)
treecbcd5cd376fac9adff0f9683e79512d652c0159d /include/llvm/CodeGen/MachineFunction.h
parentdf8de92083e9cc97999e9f2f7bc7ef1df9ac6258 (diff)
downloadllvm-96601ca332ab388754ca4673be8973396fea2ddd.tar.gz
llvm-96601ca332ab388754ca4673be8973396fea2ddd.tar.bz2
llvm-96601ca332ab388754ca4673be8973396fea2ddd.tar.xz
Add a getName function to MachineFunction. Use it in places that previously did getFunction()->getName(). Remove includes of Function.h that are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineFunction.h')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 062c7508c4..0eb9d0e509 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -138,15 +138,19 @@ public:
MachineModuleInfo &getMMI() const { return MMI; }
GCModuleInfo *getGMI() const { return GMI; }
MCContext &getContext() const { return Ctx; }
-
+
/// getFunction - Return the LLVM function that this machine code represents
///
const Function *getFunction() const { return Fn; }
+ /// getName - Return the name of the corresponding LLVM function.
+ ///
+ StringRef getName() const;
+
/// getFunctionNumber - Return a unique ID for the current function.
///
unsigned getFunctionNumber() const { return FunctionNumber; }
-
+
/// getTarget - Return the target machine this machine code is compiled with
///
const TargetMachine &getTarget() const { return Target; }