Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion interpreter/llvm-project/llvm-project.tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ROOT-llvm18-20240821-01
ROOT-llvm18-20250110-01
2 changes: 1 addition & 1 deletion interpreter/llvm-project/llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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<User *> 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<GlobalValue>(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
Expand Down
2 changes: 1 addition & 1 deletion interpreter/llvm-project/llvm/utils/lit/lit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = []
Loading