From 490edc1e0220135caedc49a1ca334e4a9d73cb19 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 15 Nov 2023 16:01:09 -0800 Subject: [PATCH] Adapt llvmorg-18-init-10631-gedd690b02e16: TTK_* --- src/indexer.cc | 8 ++++++++ src/messages/textDocument_completion.cc | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/src/indexer.cc b/src/indexer.cc index 50bb299c..68d3f810 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -28,6 +28,14 @@ using namespace clang; +#if LLVM_VERSION_MAJOR >= 18 // llvmorg-18-init-10631-gedd690b02e16 +#define TTK_Class TagTypeKind::Class +#define TTK_Enum TagTypeKind::Enum +#define TTK_Interface TagTypeKind::Interface +#define TTK_Struct TagTypeKind::Struct +#define TTK_Union TagTypeKind::Union +#endif + namespace ccls { namespace { diff --git a/src/messages/textDocument_completion.cc b/src/messages/textDocument_completion.cc index 8a7394ef..ce769d4d 100644 --- a/src/messages/textDocument_completion.cc +++ b/src/messages/textDocument_completion.cc @@ -17,6 +17,10 @@ #include #endif +#if LLVM_VERSION_MAJOR >= 18 // llvmorg-18-init-10631-gedd690b02e16 +#define TTK_Struct TagTypeKind::Struct +#endif + namespace ccls { using namespace clang; using namespace llvm;