Skip to content

Commit c774fd5

Browse files
committed
LoongArch: Update for MachineFunctionInfo construction change
1 parent eb7c515 commit c774fd5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ LoongArchTargetMachine::getSubtargetImpl(const Function &F) const {
9494
return I.get();
9595
}
9696

97+
MachineFunctionInfo *LoongArchTargetMachine::createMachineFunctionInfo(
98+
BumpPtrAllocator &Allocator, const Function &F,
99+
const TargetSubtargetInfo *STI) const {
100+
return LoongArchMachineFunctionInfo::create<LoongArchMachineFunctionInfo>(
101+
Allocator, F, STI);
102+
}
103+
97104
namespace {
98105
class LoongArchPassConfig : public TargetPassConfig {
99106
public:

llvm/lib/Target/LoongArch/LoongArchTargetMachine.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class LoongArchTargetMachine : public LLVMTargetMachine {
4040
TargetLoweringObjectFile *getObjFileLowering() const override {
4141
return TLOF.get();
4242
}
43+
44+
MachineFunctionInfo *
45+
createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,
46+
const TargetSubtargetInfo *STI) const override;
4347
};
4448

4549
} // end namespace llvm

0 commit comments

Comments
 (0)