Skip to content

Commit

Permalink
Upgrade to LLVM19
Browse files Browse the repository at this point in the history
  • Loading branch information
bstaletic committed Sep 19, 2024
1 parent 8b61f19 commit 3b74af0
Show file tree
Hide file tree
Showing 247 changed files with 73,766 additions and 73,146 deletions.
16 changes: 8 additions & 8 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def Exit( self ):
'issue tracker, including the entire output of this script (with --verbose) '
'and the invocation line used to run it.' )

CLANGD_VERSION = '18.1.1'
CLANGD_VERSION = '19.1.0'
CLANGD_BINARIES_ERROR_MESSAGE = (
'No prebuilt Clang {version} binaries for {platform}. '
'You\'ll have to compile Clangd {version} from source '
Expand Down Expand Up @@ -1166,30 +1166,30 @@ def GetClangdTarget():
if OnWindows():
return [
( 'clangd-{version}-win64',
'e5e1daf4553bd526e92a7f56805547673c1b6384f9a2a7b106008a81cd552c37' ),
'6f4a14f3f144fc39158a7088528e3c8ffa20df516404c319e42351c27dfff063' ),
( 'clangd-{version}-win32',
'424708a5405a23fb90f8e48473fa9e6340d988ee3733ce8c73e03f9052cb0a71' ) ]
'4278d11bebd7c60b945c7aa7457a82e707eeb488d24acdccdc3e354b36b808be' ) ]
if OnMac():
if OnArm():
return [
( 'clangd-{version}-arm64-apple-darwin',
'1b6d1b228f70a9903a5299c74347e7767f7fdd019e97abd879b22d56d6d7de83' ) ]
'b65d43dc82f47a68c8faf6d9711f54a29da9f25c39c3f138466c874359e5efe8' ) ]
return [
( 'clangd-{version}-x86_64-apple-darwin',
'10bed9246718a3d8993f8ccf4fec0168d4bfe7b2bf1d04cf9a8aed5cb7d8f03c' ) ]
'f3da3d4c97d1f8526299f2c64aaa0dbdeff5daad4e07a1937ad1d81b6407d143' ) ]
if OnAArch64():
return [
( 'clangd-{version}-aarch64-linux-gnu',
'5ca6d63c9822debfd2f3aa4ec2c7b61eb8f6c8391a3ee7b52051fdb089da16af' ) ]
'c279514021924c04b0b810bf79adb3cd5d7f061acb3c4b43e4c445671b3d2a18' ) ]
if OnArm():
return [
None, # First list index is for 64bit archives. ARMv7 is 32bit only.
( 'clangd-{version}-armv7a-linux-gnueabihf',
'ee6ded7b445317cced97d0002fe944b359990f6e7d7ca09dadd3f835fce7ebbb' ) ]
'f561e33a90f2053d12202d4a06477c30bf831082c01c228f1935403632bbfa81' ) ]
if OnX86_64():
return [
( 'clangd-{version}-x86_64-unknown-linux-gnu',
'128451c2689d8157189b4bb60803ca33adb75c67ce07b91b1a91ecacdfbf851f' ) ]
'93319be9a2ec662be57f7ce77463ac706ae4f559744f05f7cae4da3350a154b5' ) ]
raise InstallationFailed(
CLANGD_BINARIES_ERROR_MESSAGE.format( version = CLANGD_VERSION,
platform = 'this system' ) )
Expand Down
85 changes: 81 additions & 4 deletions cpp/llvm/include/clang-c/Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -1644,8 +1644,9 @@ enum CXCursorKind {
CXCursor_ObjCSelfExpr = 146,

/** OpenMP 5.0 [2.1.5, Array Section].
* OpenACC 3.3 [2.7.1, Data Specification for Data Clauses (Sub Arrays)]
*/
CXCursor_OMPArraySectionExpr = 147,
CXCursor_ArraySectionExpr = 147,

/** Represents an @available(...) check.
*/
Expand Down Expand Up @@ -1675,7 +1676,7 @@ enum CXCursorKind {
CXCursor_ConceptSpecializationExpr = 153,

/**
* Expression that references a C++20 concept.
* Expression that references a C++20 requires expression.
*/
CXCursor_RequiresExpr = 154,

Expand All @@ -1685,7 +1686,12 @@ enum CXCursorKind {
*/
CXCursor_CXXParenListInitExpr = 155,

CXCursor_LastExpr = CXCursor_CXXParenListInitExpr,
/**
* Represents a C++26 pack indexing expression.
*/
CXCursor_PackIndexingExpr = 156,

CXCursor_LastExpr = CXCursor_PackIndexingExpr,

/* Statements */
CXCursor_FirstStmt = 200,
Expand Down Expand Up @@ -2140,7 +2146,23 @@ enum CXCursorKind {
*/
CXCursor_OMPScopeDirective = 306,

CXCursor_LastStmt = CXCursor_OMPScopeDirective,
/** OpenMP reverse directive.
*/
CXCursor_OMPReverseDirective = 307,

/** OpenMP interchange directive.
*/
CXCursor_OMPInterchangeDirective = 308,

/** OpenACC Compute Construct.
*/
CXCursor_OpenACCComputeConstruct = 320,

/** OpenACC Loop Construct.
*/
CXCursor_OpenACCLoopConstruct = 321,

CXCursor_LastStmt = CXCursor_OpenACCLoopConstruct,

/**
* Cursor that represents the translation unit itself.
Expand Down Expand Up @@ -2981,6 +3003,8 @@ enum CXCallingConv {
CXCallingConv_SwiftAsync = 17,
CXCallingConv_AArch64SVEPCS = 18,
CXCallingConv_M68kRTD = 19,
CXCallingConv_PreserveNone = 20,
CXCallingConv_RISCVVectorCall = 21,

CXCallingConv_Invalid = 100,
CXCallingConv_Unexposed = 200
Expand Down Expand Up @@ -3734,6 +3758,59 @@ enum CX_StorageClass {
CX_SC_Register
};

/**
* Represents a specific kind of binary operator which can appear at a cursor.
*/
enum CX_BinaryOperatorKind {
CX_BO_Invalid = 0,
CX_BO_PtrMemD = 1,
CX_BO_PtrMemI = 2,
CX_BO_Mul = 3,
CX_BO_Div = 4,
CX_BO_Rem = 5,
CX_BO_Add = 6,
CX_BO_Sub = 7,
CX_BO_Shl = 8,
CX_BO_Shr = 9,
CX_BO_Cmp = 10,
CX_BO_LT = 11,
CX_BO_GT = 12,
CX_BO_LE = 13,
CX_BO_GE = 14,
CX_BO_EQ = 15,
CX_BO_NE = 16,
CX_BO_And = 17,
CX_BO_Xor = 18,
CX_BO_Or = 19,
CX_BO_LAnd = 20,
CX_BO_LOr = 21,
CX_BO_Assign = 22,
CX_BO_MulAssign = 23,
CX_BO_DivAssign = 24,
CX_BO_RemAssign = 25,
CX_BO_AddAssign = 26,
CX_BO_SubAssign = 27,
CX_BO_ShlAssign = 28,
CX_BO_ShrAssign = 29,
CX_BO_AndAssign = 30,
CX_BO_XorAssign = 31,
CX_BO_OrAssign = 32,
CX_BO_Comma = 33,
CX_BO_LAST = CX_BO_Comma
};

/**
* \brief Returns the operator code for the binary operator.
*/
CINDEX_LINKAGE enum CX_BinaryOperatorKind
clang_Cursor_getBinaryOpcode(CXCursor C);

/**
* \brief Returns a string containing the spelling of the binary operator.
*/
CINDEX_LINKAGE CXString
clang_Cursor_getBinaryOpcodeStr(enum CX_BinaryOperatorKind Op);

/**
* Returns the storage class for a function or variable declaration.
*
Expand Down
14 changes: 7 additions & 7 deletions cpp/ycm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,35 @@ if ( USE_CLANG_COMPLETER AND
if ( "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64" )
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-arm64-apple-darwin" )
set( LIBCLANG_SHA256
"04dd2ac7714e4aef14a8bb381563c753f02b6fb191d48279f9c896820c1560e9" )
"87cd54dc32df68a4d892dc5c0edd4547af30a22a8fd962ecbc25162a73508353" )
else()
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-x86_64-apple-darwin" )
set( LIBCLANG_SHA256
"4a7077c7aeb72c7583463449383fb69632cafc3d6cad12eae805412d572a3745" )
"336a25f6b2f20132707eef99f6ef6eb86428c22e712f7e35d8175b143a39ec23" )
endif()
elseif ( WIN32 )
if( 64_BIT_PLATFORM )
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-win64" )
set( LIBCLANG_SHA256
"b594a8d7cb92c14afa545668e72898bbfa29f8b280b78c57eb7d9c2a4f4e8906" )
"5d1f34a4013d2167f957ff5d2dca1fbd088dff30ed79e0a2ad83e5b09b52343c" )
else()
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-win32" )
set( LIBCLANG_SHA256
"243cee577e40c9844699898ba3c024c13c8f092ed6b8a5cfc3b8e386bb621134" )
"92115d03bfe5f2da95e1cac31d2487b2441154a37d565bdbce937957436bf129" )
endif()
elseif ( CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)" )
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-aarch64-linux-gnu" )
set( LIBCLANG_SHA256
"24fbd9a37bc3de67084aa29f0d268354b07336d38673acc147e639c19944ffb2" )
"b39fa528c4d18aacf9c0e0027e055203878685948615d2c46a73ac80b4bbb3ee" )
elseif ( CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)" )
set( LIBCLANG_DIRNAME "libclang-${CLANG_VERSION}-armv7a-linux-gnueabihf" )
set( LIBCLANG_SHA256
"4efc43e99c455f015519effa33af8b0b4cbe622a92a6d750ce64f9233cb3b447" )
"a175b0fb5d912a4374f1879ecdf8633af597d62899fc5ccca1dc4681eeae2c3d" )
elseif ( CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64)" )
set( LIBCLANG_DIRNAME
"libclang-${CLANG_VERSION}-x86_64-unknown-linux-gnu" )
set( LIBCLANG_SHA256
"04f84497cef3600569a8a52f9535547babe5298ab1709a9b83c1bf5c3d3d29b1" )
"c41d39a5526bae11bb99b8f716b5588ab2230db69253e4a99b583144f86226f7" )
else()
message( FATAL_ERROR
"No prebuilt Clang ${CLANG_VERSION} binaries for this system. "
Expand Down
Loading

0 comments on commit 3b74af0

Please sign in to comment.