diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-08-22 06:07:19 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-08-22 06:07:19 +0000 |
commit | 96601ca332ab388754ca4673be8973396fea2ddd (patch) | |
tree | cbcd5cd376fac9adff0f9683e79512d652c0159d /include | |
parent | df8de92083e9cc97999e9f2f7bc7ef1df9ac6258 (diff) | |
download | external_llvm-96601ca332ab388754ca4673be8973396fea2ddd.zip external_llvm-96601ca332ab388754ca4673be8973396fea2ddd.tar.gz external_llvm-96601ca332ab388754ca4673be8973396fea2ddd.tar.bz2 |
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')
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 062c750..0eb9d0e 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; } |