Skip to content

Commit 0b19fdd

Browse files
committed
Add another version guard
1 parent 03e35eb commit 0b19fdd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/disasm.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,7 +1178,11 @@ class LineNumberPrinterHandler : public AsmPrinterHandler {
11781178
Buffer.clear();
11791179
}
11801180

1181+
#if JL_LLVM_VERSION >= 190000
11811182
virtual void setSymbolSize(const MCSymbol *Sym, uint64_t Size) {}
1183+
#else
1184+
virtual void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
1185+
#endif
11821186
//virtual void beginModule(Module *M) override {}
11831187
virtual void endModule() override {}
11841188
/// note that some AsmPrinter implementations may not call beginFunction at all
@@ -1197,11 +1201,19 @@ class LineNumberPrinterHandler : public AsmPrinterHandler {
11971201
//virtual void beginFunclet(const MachineBasicBlock &MBB,
11981202
// MCSymbol *Sym = nullptr) override {}
11991203
//virtual void endFunclet() override {}
1204+
#if JL_LLVM_VERSION >= 190000
12001205
virtual void beginInstruction(const MachineInstr *MI) {
1206+
#else
1207+
virtual void beginInstruction(const MachineInstr &MI) override {
1208+
#endif
12011209
LinePrinter.emitInstructionAnnot(MI->getDebugLoc(), Stream);
12021210
emitAndReset();
12031211
}
1212+
#if JL_LLVM_VERSION >= 190000
12041213
virtual void endInstruction() {}
1214+
#else
1215+
virtual void endInstruction() override {}
1216+
#endif
12051217
};
12061218

12071219
// get a native assembly for llvm::Function

0 commit comments

Comments
 (0)