Skip to content

Commit 8a02708

Browse files
committed
Update to LLVM18.1.8
1 parent d75eeb8 commit 8a02708

File tree

5 files changed

+16
-42
lines changed

5 files changed

+16
-42
lines changed

interpreter/llvm-project/clang/lib/Format/TokenAnnotator.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -5159,9 +5159,11 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line,
51595159
return true;
51605160
if (Left.IsUnterminatedLiteral)
51615161
return true;
5162-
if (Right.is(tok::lessless) && Right.Next && Left.is(tok::string_literal) &&
5163-
Right.Next->is(tok::string_literal)) {
5164-
return true;
5162+
if (const auto *BeforeLeft = Left.Previous, *AfterRight = Right.Next;
5163+
BeforeLeft && BeforeLeft->is(tok::lessless) &&
5164+
Left.is(tok::string_literal) && Right.is(tok::lessless) && AfterRight &&
5165+
AfterRight->is(tok::string_literal)) {
5166+
return Right.NewlinesBefore > 0;
51655167
}
51665168
if (Right.is(TT_RequiresClause)) {
51675169
switch (Style.RequiresClausePosition) {

interpreter/llvm-project/clang/lib/Format/UnwrappedLineParser.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -1185,12 +1185,6 @@ void UnwrappedLineParser::parsePPDefine() {
11851185
return;
11861186
}
11871187

1188-
if (FormatTok->is(tok::identifier) &&
1189-
Tokens->peekNextToken()->is(tok::colon)) {
1190-
nextToken();
1191-
nextToken();
1192-
}
1193-
11941188
// Errors during a preprocessor directive can only affect the layout of the
11951189
// preprocessor directive, and thus we ignore them. An alternative approach
11961190
// would be to use the same approach we use on the file level (no
@@ -1671,7 +1665,8 @@ void UnwrappedLineParser::parseStructuralElement(
16711665
if (!Style.isJavaScript() && !Style.isVerilog() && !Style.isTableGen() &&
16721666
Tokens->peekNextToken()->is(tok::colon) && !Line->MustBeDeclaration) {
16731667
nextToken();
1674-
Line->Tokens.begin()->Tok->MustBreakBefore = true;
1668+
if (!Line->InMacroBody || CurrentLines->size() > 1)
1669+
Line->Tokens.begin()->Tok->MustBreakBefore = true;
16751670
FormatTok->setFinalizedType(TT_GotoLabelColon);
16761671
parseLabel(!Style.IndentGotoLabels);
16771672
if (HasLabel)

interpreter/llvm-project/llvm/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR)
2222
set(LLVM_VERSION_MINOR 1)
2323
endif()
2424
if(NOT DEFINED LLVM_VERSION_PATCH)
25-
set(LLVM_VERSION_PATCH 6)
25+
set(LLVM_VERSION_PATCH 8)
2626
endif()
2727
if(NOT DEFINED LLVM_VERSION_SUFFIX)
2828
set(LLVM_VERSION_SUFFIX)

interpreter/llvm-project/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp

+7-30
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,6 @@ bool PPCMergeStringPool::mergeModuleStringPool(Module &M) {
290290
return true;
291291
}
292292

293-
static bool userHasOperand(User *TheUser, GlobalVariable *GVOperand) {
294-
for (Value *Op : TheUser->operands())
295-
if (Op == GVOperand)
296-
return true;
297-
return false;
298-
}
299-
300293
// For pooled strings we need to add the offset into the pool for each string.
301294
// This is done by adding a Get Element Pointer (GEP) before each user. This
302295
// function adds the GEP.
@@ -307,29 +300,13 @@ void PPCMergeStringPool::replaceUsesWithGEP(GlobalVariable *GlobalToReplace,
307300
Indices.push_back(ConstantInt::get(Type::getInt32Ty(*Context), 0));
308301
Indices.push_back(ConstantInt::get(Type::getInt32Ty(*Context), ElementIndex));
309302

310-
// Need to save a temporary copy of each user list because we remove uses
311-
// as we replace them.
312-
SmallVector<User *> Users;
313-
for (User *CurrentUser : GlobalToReplace->users())
314-
Users.push_back(CurrentUser);
315-
316-
for (User *CurrentUser : Users) {
317-
// The user was not found so it must have been replaced earlier.
318-
if (!userHasOperand(CurrentUser, GlobalToReplace))
319-
continue;
320-
321-
// We cannot replace operands in globals so we ignore those.
322-
if (isa<GlobalValue>(CurrentUser))
323-
continue;
324-
325-
Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr(
326-
PooledStructType, GPool, Indices);
327-
LLVM_DEBUG(dbgs() << "Replacing this global:\n");
328-
LLVM_DEBUG(GlobalToReplace->dump());
329-
LLVM_DEBUG(dbgs() << "with this:\n");
330-
LLVM_DEBUG(ConstGEP->dump());
331-
GlobalToReplace->replaceAllUsesWith(ConstGEP);
332-
}
303+
Constant *ConstGEP =
304+
ConstantExpr::getInBoundsGetElementPtr(PooledStructType, GPool, Indices);
305+
LLVM_DEBUG(dbgs() << "Replacing this global:\n");
306+
LLVM_DEBUG(GlobalToReplace->dump());
307+
LLVM_DEBUG(dbgs() << "with this:\n");
308+
LLVM_DEBUG(ConstGEP->dump());
309+
GlobalToReplace->replaceAllUsesWith(ConstGEP);
333310
}
334311

335312
} // namespace

interpreter/llvm-project/llvm/utils/lit/lit/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
__author__ = "Daniel Dunbar"
44
__email__ = "[email protected]"
5-
__versioninfo__ = (18, 1, 6)
5+
__versioninfo__ = (18, 1, 8)
66
__version__ = ".".join(str(v) for v in __versioninfo__) + "dev"
77

88
__all__ = []

0 commit comments

Comments
 (0)