diff --git a/interpreter/llvm-project/clang/lib/Format/TokenAnnotator.cpp b/interpreter/llvm-project/clang/lib/Format/TokenAnnotator.cpp index c1f1662481922..628fe46cc348e 100644 --- a/interpreter/llvm-project/clang/lib/Format/TokenAnnotator.cpp +++ b/interpreter/llvm-project/clang/lib/Format/TokenAnnotator.cpp @@ -5159,9 +5159,11 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, return true; if (Left.IsUnterminatedLiteral) return true; - if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) && - Right.Next->is(tok::string_literal)) { - return true; + if (const auto *BeforeLeft = Left.Previous, *AfterRight = Right.Next; + BeforeLeft && BeforeLeft->is(tok::lessless) && + Left.is(tok::string_literal) && Right.is(tok::lessless) && AfterRight && + AfterRight->is(tok::string_literal)) { + return Right.NewlinesBefore > 0; } if (Right.is(TT_RequiresClause)) { switch (Style.RequiresClausePosition) { diff --git a/interpreter/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp b/interpreter/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp index f70affb732a0d..179d77bf00491 100644 --- a/interpreter/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp +++ b/interpreter/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp @@ -1185,12 +1185,6 @@ void UnwrappedLineParser::parsePPDefine() { return; } - if (FormatTok->is(tok::identifier) && - Tokens->peekNextToken()->is(tok::colon)) { - nextToken(); - nextToken(); - } - // Errors during a preprocessor directive can only affect the layout of the // preprocessor directive, and thus we ignore them. An alternative approach // would be to use the same approach we use on the file level (no @@ -1671,7 +1665,8 @@ void UnwrappedLineParser::parseStructuralElement( if (!Style.isJavaScript() && !Style.isVerilog() && !Style.isTableGen() && Tokens->peekNextToken()->is(tok::colon) && !Line->MustBeDeclaration) { nextToken(); - Line->Tokens.begin()->Tok->MustBreakBefore = true; + if (!Line->InMacroBody || CurrentLines->size() > 1) + Line->Tokens.begin()->Tok->MustBreakBefore = true; FormatTok->setFinalizedType(TT_GotoLabelColon); parseLabel(!Style.IndentGotoLabels); if (HasLabel) diff --git a/interpreter/llvm-project/llvm-project.tag b/interpreter/llvm-project/llvm-project.tag index 67e35cd34f6ce..79540edf8d75c 100644 --- a/interpreter/llvm-project/llvm-project.tag +++ b/interpreter/llvm-project/llvm-project.tag @@ -1 +1 @@ -ROOT-llvm18-20240821-01 +ROOT-llvm18-20250110-01 diff --git a/interpreter/llvm-project/llvm/CMakeLists.txt b/interpreter/llvm-project/llvm/CMakeLists.txt index 99b252ae7abe2..b49f594908a8f 100644 --- a/interpreter/llvm-project/llvm/CMakeLists.txt +++ b/interpreter/llvm-project/llvm/CMakeLists.txt @@ -22,7 +22,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR) set(LLVM_VERSION_MINOR 1) endif() if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 6) + set(LLVM_VERSION_PATCH 8) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) set(LLVM_VERSION_SUFFIX) diff --git a/interpreter/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp b/interpreter/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp index ebd876d50c44e..0830b02370cd0 100644 --- a/interpreter/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp +++ b/interpreter/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp @@ -290,13 +290,6 @@ bool PPCMergeStringPool::mergeModuleStringPool(Module &M) { return true; } -static bool userHasOperand(User *TheUser, GlobalVariable *GVOperand) { - for (Value *Op : TheUser->operands()) - if (Op == GVOperand) - return true; - return false; -} - // For pooled strings we need to add the offset into the pool for each string. // This is done by adding a Get Element Pointer (GEP) before each user. This // function adds the GEP. @@ -307,29 +300,13 @@ void PPCMergeStringPool::replaceUsesWithGEP(GlobalVariable *GlobalToReplace, Indices.push_back(ConstantInt::get(Type::getInt32Ty(*Context), 0)); Indices.push_back(ConstantInt::get(Type::getInt32Ty(*Context), ElementIndex)); - // Need to save a temporary copy of each user list because we remove uses - // as we replace them. - SmallVector Users; - for (User *CurrentUser : GlobalToReplace->users()) - Users.push_back(CurrentUser); - - for (User *CurrentUser : Users) { - // The user was not found so it must have been replaced earlier. - if (!userHasOperand(CurrentUser, GlobalToReplace)) - continue; - - // We cannot replace operands in globals so we ignore those. - if (isa(CurrentUser)) - continue; - - Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr( - PooledStructType, GPool, Indices); - LLVM_DEBUG(dbgs() << "Replacing this global:\n"); - LLVM_DEBUG(GlobalToReplace->dump()); - LLVM_DEBUG(dbgs() << "with this:\n"); - LLVM_DEBUG(ConstGEP->dump()); - GlobalToReplace->replaceAllUsesWith(ConstGEP); - } + Constant *ConstGEP = + ConstantExpr::getInBoundsGetElementPtr(PooledStructType, GPool, Indices); + LLVM_DEBUG(dbgs() << "Replacing this global:\n"); + LLVM_DEBUG(GlobalToReplace->dump()); + LLVM_DEBUG(dbgs() << "with this:\n"); + LLVM_DEBUG(ConstGEP->dump()); + GlobalToReplace->replaceAllUsesWith(ConstGEP); } } // namespace diff --git a/interpreter/llvm-project/llvm/utils/lit/lit/__init__.py b/interpreter/llvm-project/llvm/utils/lit/lit/__init__.py index d8b0e3bd1c69e..800d59492d8ff 100644 --- a/interpreter/llvm-project/llvm/utils/lit/lit/__init__.py +++ b/interpreter/llvm-project/llvm/utils/lit/lit/__init__.py @@ -2,7 +2,7 @@ __author__ = "Daniel Dunbar" __email__ = "daniel@minormatter.com" -__versioninfo__ = (18, 1, 6) +__versioninfo__ = (18, 1, 8) __version__ = ".".join(str(v) for v in __versioninfo__) + "dev" __all__ = []