diff options
author | Daniel Sanders <daniel_l_sanders@apple.com> | 2020-04-03 15:55:15 -0700 |
---|---|---|
committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2020-04-06 15:19:21 -0700 |
commit | 35b7b0851b1957d4f6f14f023eb3b4571cadc3d7 (patch) | |
tree | f1e54064bab99d55951002d66f57aa90f809555b /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | bcf14f375e29b94e7abb381920df795eeefb2309 (diff) | |
download | llvm-35b7b0851b1957d4f6f14f023eb3b4571cadc3d7.zip llvm-35b7b0851b1957d4f6f14f023eb3b4571cadc3d7.tar.gz llvm-35b7b0851b1957d4f6f14f023eb3b4571cadc3d7.tar.bz2 |
Allow MachineFunction to obtain non-const Function (to enable MIR-level debugify)
Summary:
To debugify MIR, we need to be able to create metadata and to do that, we
need a non-const Module. However, MachineFunction only had a const reference
to the Function preventing this.
Reviewers: aprantl, bogner
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77439
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 22dbc7f..271fc8c 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -133,8 +133,7 @@ static inline unsigned getFnStackAlignment(const TargetSubtargetInfo *STI, return STI->getFrameLowering()->getStackAlign().value(); } -MachineFunction::MachineFunction(const Function &F, - const LLVMTargetMachine &Target, +MachineFunction::MachineFunction(Function &F, const LLVMTargetMachine &Target, const TargetSubtargetInfo &STI, unsigned FunctionNum, MachineModuleInfo &mmi) : F(F), Target(Target), STI(&STI), Ctx(mmi.getContext()), MMI(mmi) { |