mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 10:32:56 +00:00
bpf: fix build due to 'Move DataLayout back to the TargetMachine'
commit r227113 moved DataLayout git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227133 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f3d4650f7
commit
bcd2c28872
@ -27,5 +27,5 @@ void BPFSubtarget::anchor() {}
|
||||
|
||||
BPFSubtarget::BPFSubtarget(const std::string &TT, const std::string &CPU,
|
||||
const std::string &FS, const TargetMachine &TM)
|
||||
: BPFGenSubtargetInfo(TT, CPU, FS), DL("e-m:e-p:64:64-i64:64-n32:64-S128"),
|
||||
InstrInfo(), FrameLowering(*this), TLInfo(TM), TSInfo(&DL) {}
|
||||
: BPFGenSubtargetInfo(TT, CPU, FS), InstrInfo(), FrameLowering(*this),
|
||||
TLInfo(TM), TSInfo(TM.getDataLayout()) {}
|
||||
|
@ -30,7 +30,6 @@ class StringRef;
|
||||
|
||||
class BPFSubtarget : public BPFGenSubtargetInfo {
|
||||
virtual void anchor();
|
||||
const DataLayout DL; // Calculates type size & alignment
|
||||
BPFInstrInfo InstrInfo;
|
||||
BPFFrameLowering FrameLowering;
|
||||
BPFTargetLowering TLInfo;
|
||||
@ -59,7 +58,6 @@ public:
|
||||
const TargetRegisterInfo *getRegisterInfo() const override {
|
||||
return &InstrInfo.getRegisterInfo();
|
||||
}
|
||||
const DataLayout *getDataLayout() const override { return &DL; }
|
||||
};
|
||||
} // End llvm namespace
|
||||
|
||||
|
@ -37,6 +37,7 @@ BPFTargetMachine::BPFTargetMachine(const Target &T, StringRef TT, StringRef CPU,
|
||||
CodeGenOpt::Level OL)
|
||||
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
|
||||
TLOF(make_unique<TargetLoweringObjectFileELF>()),
|
||||
DL("e-m:e-p:64:64-i64:64-n32:64-S128"),
|
||||
Subtarget(TT, CPU, FS, *this) {
|
||||
initAsmInfo();
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
namespace llvm {
|
||||
class BPFTargetMachine : public LLVMTargetMachine {
|
||||
std::unique_ptr<TargetLoweringObjectFile> TLOF;
|
||||
const DataLayout DL;
|
||||
BPFSubtarget Subtarget;
|
||||
|
||||
public:
|
||||
@ -27,6 +28,7 @@ public:
|
||||
const TargetOptions &Options, Reloc::Model RM,
|
||||
CodeModel::Model CM, CodeGenOpt::Level OL);
|
||||
|
||||
const DataLayout *getDataLayout() const override { return &DL; }
|
||||
const BPFSubtarget *getSubtargetImpl() const override { return &Subtarget; }
|
||||
|
||||
TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user