Skip to content

Commit ada1fc7

Browse files
committed
Merged main:9ad4ebd82b60 into amd-gfx:5feec07126dd
Local branch amd-gfx 5feec07 Merged main:f3549814f8a2 into amd-gfx:681f277691b2 Remote branch main 9ad4ebd [mlir][OpenMP][NFC] break out priv var init into helper (llvm#125303) Change-Id: Iaab6369bc4c75c936271600caef96625ecc7394c
2 parents 5feec07 + 9ad4ebd commit ada1fc7

File tree

408 files changed

+10251
-8652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+10251
-8652
lines changed

.github/workflows/premerge.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ jobs:
139139
group: ${{ github.workflow }}-macos-${{ github.event.pull_request.number || github.sha }}
140140
cancel-in-progress: true
141141
if: >-
142+
github.repository_owner == 'llvm' &&
142143
(startswith(github.ref_name, 'release/') ||
143-
startswith(github.base_ref, 'refs/heads/release/'))
144+
startswith(github.base_ref, 'release/'))
144145
steps:
145146
- name: Checkout LLVM
146147
uses: actions/checkout@v4

bolt/test/X86/dynamic-relocs-on-entry.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
# RUN: %clang %cflags -fPIC -pie %s -o %t.exe -nostdlib -Wl,-q
66
# RUN: llvm-bolt %t.exe -o %t.bolt > %t.out.txt
7-
# RUN: readelf -r %t.bolt >> %t.out.txt
7+
# RUN: llvm-readelf -r %t.bolt >> %t.out.txt
88
# RUN: llvm-objdump --disassemble-symbols=chain %t.bolt >> %t.out.txt
99
# RUN: FileCheck %s --input-file=%t.out.txt
1010

1111
## Check if the new address in `chain` is correctly updated by BOLT
12-
# CHECK: Relocation section '.rela.dyn' at offset 0x{{.*}} contains 1 entry:
12+
# CHECK: Relocation section '.rela.dyn' at offset 0x{{.*}} contains 1 entries:
1313
# CHECK: {{.*}} R_X86_64_RELATIVE [[#%x,ADDR:]]
1414
# CHECK: [[#ADDR]]: c3 retq
1515
.text
@@ -29,4 +29,4 @@ _start:
2929

3030
.data
3131
.Lfoo:
32-
.quad Label
32+
.quad Label

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ Code Completion
219219
Static Analyzer
220220
---------------
221221

222+
- Clang currently support extending lifetime of object bound to
223+
reference members of aggregates in CFG and ExprEngine, that are
224+
created from default member initializer.
225+
222226
New features
223227
^^^^^^^^^^^^
224228

clang/include/clang/AST/ExprCXX.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5040,7 +5040,7 @@ class CXXParenListInitExpr final
50405040
}
50415041

50425042
const FieldDecl *getInitializedFieldInUnion() const {
5043-
return ArrayFillerOrUnionFieldInit.dyn_cast<FieldDecl *>();
5043+
return dyn_cast_if_present<FieldDecl *>(ArrayFillerOrUnionFieldInit);
50445044
}
50455045

50465046
child_range children() {

clang/include/clang/Driver/Options.td

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7302,6 +7302,9 @@ let Visibility = [CC1Option, FC1Option] in {
73027302
def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
73037303
HelpText<"Link and internalize needed symbols from the given bitcode file "
73047304
"before performing optimizations.">;
7305+
def mlink_bitcode_file
7306+
: Separate<["-"], "mlink-bitcode-file">,
7307+
HelpText<"Link the given bitcode file before performing optimizations.">;
73057308
} // let Visibility = [CC1Option, FC1Option]
73067309

73077310
let Visibility = [CC1Option] in {
@@ -7405,14 +7408,13 @@ def msmall_data_limit : Separate<["-"], "msmall-data-limit">,
74057408
def funwind_tables_EQ : Joined<["-"], "funwind-tables=">,
74067409
HelpText<"Generate unwinding tables for all functions">,
74077410
MarshallingInfoInt<CodeGenOpts<"UnwindTables">>;
7408-
defm constructor_aliases : BoolMOption<"constructor-aliases",
7409-
CodeGenOpts<"CXXCtorDtorAliases">, DefaultFalse,
7410-
PosFlag<SetTrue, [], [ClangOption], "Enable">,
7411-
NegFlag<SetFalse, [], [ClangOption], "Disable">,
7412-
BothFlags<[], [ClangOption, CC1Option],
7413-
" emitting complete constructors and destructors as aliases when possible">>;
7414-
def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
7415-
HelpText<"Link the given bitcode file before performing optimizations.">;
7411+
defm constructor_aliases
7412+
: BoolMOption<"constructor-aliases", CodeGenOpts<"CXXCtorDtorAliases">,
7413+
DefaultFalse, PosFlag<SetTrue, [], [ClangOption], "Enable">,
7414+
NegFlag<SetFalse, [], [ClangOption], "Disable">,
7415+
BothFlags<[], [ClangOption, CC1Option],
7416+
" emitting complete constructors and destructors "
7417+
"as aliases when possible">>;
74167418
defm link_builtin_bitcode_postopt: BoolMOption<"link-builtin-bitcode-postopt",
74177419
CodeGenOpts<"LinkBitcodePostopt">, DefaultFalse,
74187420
PosFlag<SetTrue, [], [ClangOption], "Link builtin bitcodes after the "

clang/include/clang/Lex/Preprocessor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ class Preprocessor {
933933
}
934934

935935
ArrayRef<ModuleMacro*> getOverriddenMacros() const {
936-
if (auto *Info = State.dyn_cast<ModuleMacroInfo*>())
936+
if (auto *Info = dyn_cast_if_present<ModuleMacroInfo *>(State))
937937
return Info->OverriddenMacros;
938938
return {};
939939
}

clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,8 @@ class BugReporterContext {
748748
/// It can be valuable to produce tags with some bits of information and later
749749
/// reuse them for a better diagnostic.
750750
///
751-
/// Please make sure that derived class' constuctor is private and that the user
752-
/// can only create objects using DataTag::Factory. This also means that
751+
/// Please make sure that derived class' constructor is private and that the
752+
/// user can only create objects using DataTag::Factory. This also means that
753753
/// DataTag::Factory should be friend for every derived class.
754754
class DataTag : public ProgramPointTag {
755755
public:

clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConstraintManager.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,7 @@ class SMTConstraintManager : public clang::ento::SimpleConstraintManager {
353353
addStateConstraints(NewState);
354354

355355
std::optional<bool> res = Solver->check();
356-
if (!res)
357-
Cached[hash] = ConditionTruthVal();
358-
else
359-
Cached[hash] = ConditionTruthVal(*res);
360-
361-
return Cached[hash];
356+
return Cached[hash] = res ? ConditionTruthVal(*res) : ConditionTruthVal();
362357
}
363358

364359
// Cache the result of an SMT query (true, false, unknown). The key is the

clang/lib/AST/ByteCode/ByteCodeEmitter.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,9 @@ Function *ByteCodeEmitter::compileFunc(const FunctionDecl *FuncDecl) {
135135
// Create a handle over the emitted code.
136136
Function *Func = P.getFunction(FuncDecl);
137137
if (!Func) {
138-
unsigned BuiltinID = FuncDecl->getBuiltinID();
139-
Func =
140-
P.createFunction(FuncDecl, ParamOffset, std::move(ParamTypes),
141-
std::move(ParamDescriptors), std::move(ParamOffsets),
142-
HasThisPointer, HasRVO, BuiltinID);
138+
Func = P.createFunction(FuncDecl, ParamOffset, std::move(ParamTypes),
139+
std::move(ParamDescriptors),
140+
std::move(ParamOffsets), HasThisPointer, HasRVO);
143141
}
144142

145143
assert(Func);
@@ -212,8 +210,7 @@ Function *ByteCodeEmitter::compileObjCBlock(const BlockExpr *BE) {
212210
Function *Func =
213211
P.createFunction(BE, ParamOffset, std::move(ParamTypes),
214212
std::move(ParamDescriptors), std::move(ParamOffsets),
215-
/*HasThisPointer=*/false, /*HasRVO=*/false,
216-
/*IsUnevaluatedBuiltin=*/false);
213+
/*HasThisPointer=*/false, /*HasRVO=*/false);
217214

218215
assert(Func);
219216
Func->setDefined(true);

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4991,8 +4991,8 @@ bool Compiler<Emitter>::visitCompoundStmt(const CompoundStmt *S) {
49914991
template <class Emitter>
49924992
bool Compiler<Emitter>::visitDeclStmt(const DeclStmt *DS) {
49934993
for (const auto *D : DS->decls()) {
4994-
if (isa<StaticAssertDecl, TagDecl, TypedefNameDecl, UsingEnumDecl,
4995-
FunctionDecl>(D))
4994+
if (isa<StaticAssertDecl, TagDecl, TypedefNameDecl, BaseUsingDecl,
4995+
FunctionDecl, NamespaceAliasDecl>(D))
49964996
continue;
49974997

49984998
const auto *VD = dyn_cast<VarDecl>(D);

0 commit comments

Comments
 (0)