Skip to content

Commit 16f90e9

Browse files
Merge branch 'llvm:main' into gh-101657
2 parents eb74bb5 + 320ec7f commit 16f90e9

File tree

248 files changed

+5539
-783
lines changed

Some content is hidden

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

248 files changed

+5539
-783
lines changed

bolt/docs/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ if (LLVM_ENABLE_DOXYGEN)
4848
set(bolt_doxygen_qhp_cust_filter_attrs "")
4949
endif()
5050

51-
option(LLVM_DOXYGEN_SVG
52-
"Use svg instead of png files for doxygen graphs." OFF)
53-
if (LLVM_DOXYGEN_SVG)
54-
set(DOT_IMAGE_FORMAT "svg")
55-
else()
56-
set(DOT_IMAGE_FORMAT "png")
57-
endif()
58-
5951
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
6052
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6153

@@ -73,7 +65,6 @@ if (LLVM_ENABLE_DOXYGEN)
7365
set(bolt_doxygen_qhelpgenerator_path)
7466
set(bolt_doxygen_qhp_cust_filter_name)
7567
set(bolt_doxygen_qhp_cust_filter_attrs)
76-
set(DOT_IMAGE_FORMAT)
7768

7869
add_custom_target(doxygen-bolt
7970
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

bolt/docs/doxygen.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ DIRECTORY_GRAPH = YES
22102210
# The default value is: png.
22112211
# This tag requires that the tag HAVE_DOT is set to YES.
22122212

2213-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2213+
DOT_IMAGE_FORMAT = svg
22142214

22152215
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22162216
# enable generation of interactive SVG images that allow zooming and panning.

clang-tools-extra/docs/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ if (DOXYGEN_FOUND)
4646
set(clang_tools_doxygen_qhp_cust_filter_attrs "")
4747
endif()
4848

49-
option(LLVM_DOXYGEN_SVG
50-
"Use svg instead of png files for doxygen graphs." OFF)
51-
if (LLVM_DOXYGEN_SVG)
52-
set(DOT_IMAGE_FORMAT "svg")
53-
else()
54-
set(DOT_IMAGE_FORMAT "png")
55-
endif()
56-
5749
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
5850
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
5951

@@ -71,7 +63,6 @@ if (DOXYGEN_FOUND)
7163
set(clang_tools_doxygen_qhelpgenerator_path)
7264
set(clang_tools_doxygen_qhp_cust_filter_name)
7365
set(clang_tools_doxygen_qhp_cust_filter_attrs)
74-
set(DOT_IMAGE_FORMAT)
7566

7667
add_custom_target(doxygen-clang-tools
7768
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

clang-tools-extra/docs/doxygen.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ DIRECTORY_GRAPH = YES
22052205
# The default value is: png.
22062206
# This tag requires that the tag HAVE_DOT is set to YES.
22072207

2208-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2208+
DOT_IMAGE_FORMAT = svg
22092209

22102210
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
22112211
# enable generation of interactive SVG images that allow zooming and panning.

clang/docs/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,6 @@ if (LLVM_ENABLE_DOXYGEN)
4747
set(clang_doxygen_qhp_cust_filter_attrs "")
4848
endif()
4949

50-
option(LLVM_DOXYGEN_SVG
51-
"Use svg instead of png files for doxygen graphs." OFF)
52-
if (LLVM_DOXYGEN_SVG)
53-
set(DOT_IMAGE_FORMAT "svg")
54-
else()
55-
set(DOT_IMAGE_FORMAT "png")
56-
endif()
57-
5850
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxygen.cfg.in
5951
${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
6052

@@ -72,7 +64,6 @@ if (LLVM_ENABLE_DOXYGEN)
7264
set(clang_doxygen_qhelpgenerator_path)
7365
set(clang_doxygen_qhp_cust_filter_name)
7466
set(clang_doxygen_qhp_cust_filter_attrs)
75-
set(DOT_IMAGE_FORMAT)
7667

7768
add_custom_target(doxygen-clang
7869
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg

clang/docs/CommandGuide/clang.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,8 @@ Code Generation Options
443443
:option:`-Oz` Like :option:`-Os` (and thus :option:`-O2`), but reduces code
444444
size further.
445445

446-
:option:`-Og` Similar to :option:`-O1`, but with slightly reduced
447-
optimization and better variable visibility. The same optimizations are run
448-
as at :option:`-O1`, but the ``-fextend-variable-liveness`` flag is
449-
also set, which tries to prevent optimizations from reducing the liveness of
450-
user variables, improving their availability when debugging.
446+
:option:`-Og` Like :option:`-O1`. In future versions, this option might
447+
disable different optimizations in order to improve debuggability.
451448

452449
:option:`-O` Equivalent to :option:`-O1`.
453450

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ Modified Compiler Flags
230230

231231
- The ``-mexecute-only`` and ``-mpure-code`` flags are now accepted for AArch64 targets. (#GH125688)
232232

233-
- The ``-Og`` optimization flag now sets ``-fextend-variable-liveness``,
234-
reducing performance slightly while reducing the number of optimized-out
235-
variables.
236-
237233
Removed Compiler Flags
238234
-------------------------
239235

clang/docs/doxygen.cfg.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,7 @@ DIRECTORY_GRAPH = YES
21932193
# The default value is: png.
21942194
# This tag requires that the tag HAVE_DOT is set to YES.
21952195

2196-
DOT_IMAGE_FORMAT = @DOT_IMAGE_FORMAT@
2196+
DOT_IMAGE_FORMAT = svg
21972197

21982198
# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
21992199
# enable generation of interactive SVG images that allow zooming and panning.

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class Stmt;
4646

4747
namespace ento {
4848

49+
class CallEvent;
4950
class ConditionTruthVal;
5051
class ProgramStateManager;
5152
class StoreRef;
52-
5353
class SValBuilder {
5454
virtual void anchor();
5555

@@ -209,6 +209,12 @@ class SValBuilder {
209209
const LocationContext *LCtx,
210210
QualType type,
211211
unsigned visitCount);
212+
DefinedOrUnknownSVal conjureSymbolVal(const CallEvent &call, QualType type,
213+
unsigned visitCount,
214+
const void *symbolTag = nullptr);
215+
DefinedOrUnknownSVal conjureSymbolVal(const CallEvent &call,
216+
unsigned visitCount,
217+
const void *symbolTag = nullptr);
212218

213219
/// Conjure a symbol representing heap allocated memory region.
214220
///

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,7 @@ bool Compiler<Emitter>::VisitCastExpr(const CastExpr *CE) {
364364
Desc = P.createDescriptor(SubExpr, *T);
365365
else
366366
Desc = P.createDescriptor(SubExpr, PointeeType.getTypePtr(),
367-
std::nullopt, true, false,
368-
/*IsMutable=*/false, nullptr);
367+
std::nullopt, /*IsConst=*/true);
369368
}
370369

371370
uint64_t Val = Ctx.getASTContext().getTargetNullPointerValue(CE->getType());
@@ -417,8 +416,7 @@ bool Compiler<Emitter>::VisitCastExpr(const CastExpr *CE) {
417416
Desc = nullptr;
418417
else
419418
Desc = P.createDescriptor(CE, PtrType->getPointeeType().getTypePtr(),
420-
Descriptor::InlineDescMD, true, false,
421-
/*IsMutable=*/false, nullptr);
419+
Descriptor::InlineDescMD, /*IsConst=*/true);
422420

423421
if (!this->emitGetIntPtr(T, Desc, CE))
424422
return false;
@@ -3400,14 +3398,13 @@ bool Compiler<Emitter>::VisitCXXNewExpr(const CXXNewExpr *E) {
34003398
Desc = nullptr; // We're not going to use it in this case.
34013399
else
34023400
Desc = P.createDescriptor(E, *ElemT, /*SourceTy=*/nullptr,
3403-
Descriptor::InlineDescMD,
3404-
/*IsConst=*/false, /*IsTemporary=*/false,
3405-
/*IsMutable=*/false);
3401+
Descriptor::InlineDescMD);
34063402
} else {
34073403
Desc = P.createDescriptor(
34083404
E, ElementType.getTypePtr(),
34093405
E->isArray() ? std::nullopt : Descriptor::InlineDescMD,
3410-
/*IsConst=*/false, /*IsTemporary=*/false, /*IsMutable=*/false, Init);
3406+
/*IsConst=*/false, /*IsTemporary=*/false, /*IsMutable=*/false,
3407+
/*IsVolatile=*/false, Init);
34113408
}
34123409
}
34133410

@@ -4355,7 +4352,7 @@ Compiler<Emitter>::allocateLocal(DeclTy &&Src, QualType Ty,
43554352

43564353
Descriptor *D = P.createDescriptor(
43574354
Src, Ty.getTypePtr(), Descriptor::InlineDescMD, Ty.isConstQualified(),
4358-
IsTemporary, /*IsMutable=*/false, Init);
4355+
IsTemporary, /*IsMutable=*/false, /*IsVolatile=*/false, Init);
43594356
if (!D)
43604357
return std::nullopt;
43614358
D->IsConstexprUnknown = IsConstexprUnknown;
@@ -4377,7 +4374,7 @@ std::optional<unsigned> Compiler<Emitter>::allocateTemporary(const Expr *E) {
43774374

43784375
Descriptor *D = P.createDescriptor(
43794376
E, Ty.getTypePtr(), Descriptor::InlineDescMD, Ty.isConstQualified(),
4380-
/*IsTemporary=*/true, /*IsMutable=*/false, /*Init=*/nullptr);
4377+
/*IsTemporary=*/true);
43814378

43824379
if (!D)
43834380
return std::nullopt;
@@ -4936,6 +4933,8 @@ bool Compiler<Emitter>::VisitCallExpr(const CallExpr *E) {
49364933
}
49374934
} else if (const auto *PD =
49384935
dyn_cast<CXXPseudoDestructorExpr>(E->getCallee())) {
4936+
if (!this->emitCheckPseudoDtor(E))
4937+
return false;
49394938
const Expr *Base = PD->getBase();
49404939
if (!Base->isGLValue())
49414940
return this->discard(Base);

0 commit comments

Comments
 (0)