From f00b5759ea2ee194a77e1c577464ccb737950bfe Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Tue, 24 Oct 2023 18:30:19 -0400 Subject: [PATCH] remove some ops that are not yet defined in LLVM 15 --- lib/Dialect/OpDescription.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/Dialect/OpDescription.cpp b/lib/Dialect/OpDescription.cpp index 652a449..a6c5f18 100644 --- a/lib/Dialect/OpDescription.cpp +++ b/lib/Dialect/OpDescription.cpp @@ -145,17 +145,27 @@ template <> const OpDescription &OpDescription::get() { // ============================================================================ // Descriptions of intrinsic facades implemented in LLVM + +#if HAVE_LLVM_VERSION_MAJOR >= 16 HANDLE_INTRINSIC_DESC_OPCODE_SET(LifetimeIntrinsic, Intrinsic::lifetime_start, Intrinsic::lifetime_end) +#endif // Add Intrinsic::dbg_addr back for sufficiently recent LLVM HANDLE_INTRINSIC_DESC_OPCODE_SET(DbgInfoIntrinsic, Intrinsic::dbg_declare, - Intrinsic::dbg_value, Intrinsic::dbg_label, - Intrinsic::dbg_assign) + Intrinsic::dbg_value, Intrinsic::dbg_label +#if HAVE_LLVM_VERSION_MAJOR >= 16 + ,Intrinsic::dbg_assign +#endif + ) // Add Intrinsic::dbg_addr back for sufficiently recent LLVM HANDLE_INTRINSIC_DESC_OPCODE_SET(DbgVariableIntrinsic, Intrinsic::dbg_declare, - Intrinsic::dbg_value, Intrinsic::dbg_assign) + Intrinsic::dbg_value +#if HAVE_LLVM_VERSION_MAJOR >= 16 + ,Intrinsic::dbg_assign +#endif + ) HANDLE_INTRINSIC_DESC(DbgDeclareInst, dbg_declare) HANDLE_INTRINSIC_DESC(DbgValueInst, dbg_value) @@ -163,7 +173,9 @@ HANDLE_INTRINSIC_DESC(DbgValueInst, dbg_value) // Add this back for sufficiently recent LLVM // HANDLE_INTRINSIC_DESC(DbgAddrIntrinsic, dbg_addr) +#if HAVE_LLVM_VERSION_MAJOR >= 16 HANDLE_INTRINSIC_DESC(DbgAssignIntrinsic, dbg_assign) +#endif HANDLE_INTRINSIC_DESC(DbgLabelInst, dbg_label) HANDLE_INTRINSIC_DESC_OPCODE_SET(AtomicMemIntrinsic,