Skip to content

Commit eda76af

Browse files
committed
Merge from 'main' to 'sycl-web' (#1)
CONFLICT (content): Merge conflict in clang/lib/Basic/Targets/SPIR.h
2 parents 62e5985 + aaba371 commit eda76af

File tree

319 files changed

+10324
-8058
lines changed

Some content is hidden

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

319 files changed

+10324
-8058
lines changed

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7489,12 +7489,6 @@ def warn_deprecated_volatile_structured_binding : Warning<
74897489
"volatile qualifier in structured binding declaration is deprecated">,
74907490
InGroup<DeprecatedVolatile>;
74917491

7492-
def warn_deprecated_altivec_src_compat : Warning<
7493-
"Current handling of vector bool and vector pixel types in this context are "
7494-
"deprecated. The default behaviour will soon change to that implied by the "
7495-
"'-altivec-compat=xl' option">,
7496-
InGroup<DiagGroup<"deprecated-altivec-src-compat">>;
7497-
74987492
def err_catch_incomplete_ptr : Error<
74997493
"cannot catch pointer to incomplete type %0">;
75007494
def err_catch_incomplete_ref : Error<

clang/include/clang/Basic/LangOptions.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ LANGOPT(WritableStrings , 1, 0, "writable string support")
126126
LANGOPT(ConstStrings , 1, 0, "const-qualified string support")
127127
ENUM_LANGOPT(LaxVectorConversions, LaxVectorConversionKind, 2,
128128
LaxVectorConversionKind::All, "lax vector conversions")
129-
ENUM_LANGOPT(AltivecSrcCompat, AltivecSrcCompatKind, 2,
130-
AltivecSrcCompatKind::Default, "Altivec source compatibility")
131129
LANGOPT(ConvergentFunctions, 1, 1, "Assume convergent functions")
132130
LANGOPT(AltiVec , 1, 0, "AltiVec-style vector initializers")
133131
LANGOPT(ZVector , 1, 0, "System z vector extensions")

clang/include/clang/Basic/LangOptions.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,6 @@ class LangOptions : public LangOptionsBase {
249249
All,
250250
};
251251

252-
enum class AltivecSrcCompatKind {
253-
// All vector compares produce scalars except vector pixel and vector bool.
254-
// The types vector pixel and vector bool return vector results.
255-
Mixed,
256-
// All vector compares produce vector results as in GCC.
257-
GCC,
258-
// All vector compares produce scalars as in XL.
259-
XL,
260-
// Default clang behaviour.
261-
Default = Mixed,
262-
};
263-
264252
enum class SignReturnAddressScopeKind {
265253
/// No signing for any function.
266254
None,

clang/include/clang/Basic/TargetInfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ class TargetInfo : public virtual TransferrableTargetInfo,
11621162
/// Apply changes to the target information with respect to certain
11631163
/// language options which change the target configuration and adjust
11641164
/// the language based on the target options where applicable.
1165-
virtual void adjust(LangOptions &Opts);
1165+
virtual void adjust(DiagnosticsEngine &Diags, LangOptions &Opts);
11661166

11671167
/// Adjust target options based on codegen options.
11681168
virtual void adjustTargetOptions(const CodeGenOptions &CGOpts,

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,8 +3294,8 @@ defm aapcs_bitfield_width : BoolOption<"f", "aapcs-bitfield-width",
32943294
" volatile bit-field width is dictated by the field container type. (ARM only).">>,
32953295
Group<m_arm_Features_Group>;
32963296

3297-
def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_aarch64_Features_Group>,
3298-
HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">;
3297+
def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_Group>,
3298+
HelpText<"Generate code which only uses the general purpose registers (AArch64/x86 only)">;
32993299
def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">,
33003300
Group<m_aarch64_Features_Group>,
33013301
HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">;
@@ -3912,18 +3912,6 @@ def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>;
39123912
def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>,
39133913
HelpText<"Show commands to run and use verbose output">,
39143914
MarshallingInfoFlag<HeaderSearchOpts<"Verbose">>;
3915-
def altivec_src_compat : Joined<["-"], "faltivec-src-compat=">,
3916-
Flags<[CC1Option]>, Group<f_Group>,
3917-
HelpText<"Source-level compatibility for Altivec vectors (for PowerPC "
3918-
"targets). This includes results of vector comparison (scalar for "
3919-
"'xl', vector for 'gcc') as well as behavior when initializing with "
3920-
"a scalar (splatting for 'xl', element zero only for 'gcc'). For "
3921-
"'mixed', the compatibility is as 'gcc' for 'vector bool/vector "
3922-
"pixel' and as 'xl' for other types. Current default is 'mixed'.">,
3923-
Values<"mixed,gcc,xl">,
3924-
NormalizedValuesScope<"LangOptions::AltivecSrcCompatKind">,
3925-
NormalizedValues<["Mixed", "GCC", "XL"]>,
3926-
MarshallingInfoEnum<LangOpts<"AltivecSrcCompat">, "Mixed">;
39273915
def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[NoXarchOption]>,
39283916
HelpText<"Verify the binary representation of debug output">;
39293917
def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class CompoundValData : public llvm::FoldingSetNode {
5252
iterator begin() const { return L.begin(); }
5353
iterator end() const { return L.end(); }
5454

55+
QualType getType() const { return T; }
56+
5557
static void Profile(llvm::FoldingSetNodeID& ID, QualType T,
5658
llvm::ImmutableList<SVal> L);
5759

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,19 @@ class SVal {
201201
SymExpr::symbol_iterator symbol_end() const {
202202
return SymExpr::symbol_end();
203203
}
204+
205+
/// Try to get a reasonable type for the given value.
206+
///
207+
/// \returns The best approximation of the value type or Null.
208+
/// In theory, all symbolic values should be typed, but this function
209+
/// is still a WIP and might have a few blind spots.
210+
///
211+
/// \note This function should not be used when the user has access to the
212+
/// bound expression AST node as well, since AST always has exact types.
213+
///
214+
/// \note Loc values are interpreted as pointer rvalues for the purposes of
215+
/// this method.
216+
QualType getType(const ASTContext &) const;
204217
};
205218

206219
inline raw_ostream &operator<<(raw_ostream &os, clang::ento::SVal V) {

clang/lib/AST/TypePrinter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,8 +1456,7 @@ void TypePrinter::printTemplateId(const TemplateSpecializationType *T,
14561456
T->getTemplateName().print(OS, Policy);
14571457
}
14581458

1459-
const TemplateParameterList *TPL = TD ? TD->getTemplateParameters() : nullptr;
1460-
printTemplateArgumentList(OS, T->template_arguments(), Policy, TPL);
1459+
printTemplateArgumentList(OS, T->template_arguments(), Policy);
14611460
spaceBeforePlaceHolder(OS);
14621461
}
14631462

clang/lib/Basic/TargetInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ bool TargetInfo::isTypeSigned(IntType T) {
346346
/// Apply changes to the target information with respect to certain
347347
/// language options which change the target configuration and adjust
348348
/// the language based on the target options where applicable.
349-
void TargetInfo::adjust(LangOptions &Opts) {
349+
void TargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) {
350350
if (Opts.NoBitFieldTypeAlign)
351351
UseBitFieldTypeAlignment = false;
352352

clang/lib/Basic/Targets/AMDGPU.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ AMDGPUTargetInfo::AMDGPUTargetInfo(const llvm::Triple &Triple,
358358
MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
359359
}
360360

361-
void AMDGPUTargetInfo::adjust(LangOptions &Opts) {
362-
TargetInfo::adjust(Opts);
361+
void AMDGPUTargetInfo::adjust(DiagnosticsEngine &Diags, LangOptions &Opts) {
362+
TargetInfo::adjust(Diags, Opts);
363363
// ToDo: There are still a few places using default address space as private
364364
// address space in OpenCL, which needs to be cleaned up, then Opts.OpenCL
365365
// can be removed from the following line.

0 commit comments

Comments
 (0)