Skip to content

Commit d1ebfa2

Browse files
committed
Merge from 'master' to 'sycl-web' (#46)
CONFLICT (content): Merge conflict in README.md
2 parents c717933 + 9d54b16 commit d1ebfa2

File tree

150 files changed

+7468
-2101
lines changed

Some content is hidden

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

150 files changed

+7468
-2101
lines changed

clang/include/clang/AST/ASTContext.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -3069,9 +3069,8 @@ OPT_LIST(V)
30693069
};
30703070

30713071
/// Insertion operator for diagnostics.
3072-
const StreamableDiagnosticBase &
3073-
operator<<(const StreamableDiagnosticBase &DB,
3074-
const ASTContext::SectionInfo &Section);
3072+
const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
3073+
const ASTContext::SectionInfo &Section);
30753074

30763075
/// Utility function for constructing a nullary selector.
30773076
inline Selector GetNullarySelector(StringRef name, ASTContext &Ctx) {

clang/include/clang/AST/Attr.h

+9-2
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,19 @@ struct ParsedTargetAttr {
351351

352352
#include "clang/AST/Attrs.inc"
353353

354-
inline const StreamableDiagnosticBase &
355-
operator<<(const StreamableDiagnosticBase &DB, const Attr *At) {
354+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
355+
const Attr *At) {
356356
DB.AddTaggedVal(reinterpret_cast<intptr_t>(At),
357357
DiagnosticsEngine::ak_attr);
358358
return DB;
359359
}
360+
361+
inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
362+
const Attr *At) {
363+
PD.AddTaggedVal(reinterpret_cast<intptr_t>(At),
364+
DiagnosticsEngine::ak_attr);
365+
return PD;
366+
}
360367
} // end namespace clang
361368

362369
#endif

clang/include/clang/AST/CanonicalType.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ inline CanQualType Type::getCanonicalTypeUnqualified() const {
215215
return CanQualType::CreateUnsafe(getCanonicalTypeInternal());
216216
}
217217

218-
inline const StreamableDiagnosticBase &
219-
operator<<(const StreamableDiagnosticBase &DB, CanQualType T) {
218+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
219+
CanQualType T) {
220220
DB << static_cast<QualType>(T);
221221
return DB;
222222
}

clang/include/clang/AST/Decl.h

+8-2
Original file line numberDiff line numberDiff line change
@@ -4514,8 +4514,14 @@ class EmptyDecl : public Decl {
45144514

45154515
/// Insertion operator for diagnostics. This allows sending NamedDecl's
45164516
/// into a diagnostic with <<.
4517-
inline const StreamableDiagnosticBase &
4518-
operator<<(const StreamableDiagnosticBase &PD, const NamedDecl *ND) {
4517+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
4518+
const NamedDecl* ND) {
4519+
DB.AddTaggedVal(reinterpret_cast<intptr_t>(ND),
4520+
DiagnosticsEngine::ak_nameddecl);
4521+
return DB;
4522+
}
4523+
inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
4524+
const NamedDecl* ND) {
45194525
PD.AddTaggedVal(reinterpret_cast<intptr_t>(ND),
45204526
DiagnosticsEngine::ak_nameddecl);
45214527
return PD;

clang/include/clang/AST/DeclCXX.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -4070,8 +4070,11 @@ class MSGuidDecl : public ValueDecl,
40704070

40714071
/// Insertion operator for diagnostics. This allows sending an AccessSpecifier
40724072
/// into a diagnostic with <<.
4073-
const StreamableDiagnosticBase &operator<<(const StreamableDiagnosticBase &DB,
4074-
AccessSpecifier AS);
4073+
const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
4074+
AccessSpecifier AS);
4075+
4076+
const PartialDiagnostic &operator<<(const PartialDiagnostic &DB,
4077+
AccessSpecifier AS);
40754078

40764079
} // namespace clang
40774080

clang/include/clang/AST/DeclarationName.h

+11-2
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,19 @@ struct DeclarationNameInfo {
811811
SourceLocation getEndLocPrivate() const;
812812
};
813813

814+
/// Insertion operator for diagnostics. This allows sending DeclarationName's
815+
/// into a diagnostic with <<.
816+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
817+
DeclarationName N) {
818+
DB.AddTaggedVal(N.getAsOpaqueInteger(),
819+
DiagnosticsEngine::ak_declarationname);
820+
return DB;
821+
}
822+
814823
/// Insertion operator for partial diagnostics. This allows binding
815824
/// DeclarationName's into a partial diagnostic with <<.
816-
inline const StreamableDiagnosticBase &
817-
operator<<(const StreamableDiagnosticBase &PD, DeclarationName N) {
825+
inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
826+
DeclarationName N) {
818827
PD.AddTaggedVal(N.getAsOpaqueInteger(),
819828
DiagnosticsEngine::ak_declarationname);
820829
return PD;

clang/include/clang/AST/NestedNameSpecifier.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,8 @@ class NestedNameSpecifierLocBuilder {
519519

520520
/// Insertion operator for diagnostics. This allows sending
521521
/// NestedNameSpecifiers into a diagnostic with <<.
522-
inline const StreamableDiagnosticBase &
523-
operator<<(const StreamableDiagnosticBase &DB, NestedNameSpecifier *NNS) {
522+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
523+
NestedNameSpecifier *NNS) {
524524
DB.AddTaggedVal(reinterpret_cast<intptr_t>(NNS),
525525
DiagnosticsEngine::ak_nestednamespec);
526526
return DB;

clang/include/clang/AST/TemplateBase.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ struct alignas(void *) ASTTemplateKWAndArgsInfo {
681681
TemplateArgumentListInfo &List) const;
682682
};
683683

684-
const StreamableDiagnosticBase &operator<<(const StreamableDiagnosticBase &DB,
685-
const TemplateArgument &Arg);
684+
const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
685+
const TemplateArgument &Arg);
686686

687687
inline TemplateSpecializationType::iterator
688688
TemplateSpecializationType::end() const {

clang/include/clang/AST/TemplateName.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,10 @@ class TemplateName {
342342

343343
/// Insertion operator for diagnostics. This allows sending TemplateName's
344344
/// into a diagnostic with <<.
345-
const StreamableDiagnosticBase &operator<<(const StreamableDiagnosticBase &DB,
346-
TemplateName N);
345+
const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
346+
TemplateName N);
347+
const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
348+
TemplateName N);
347349

348350
/// A structure for storing the information associated with a
349351
/// substituted template template parameter.

clang/include/clang/AST/Type.h

+33-6
Original file line numberDiff line numberDiff line change
@@ -7103,28 +7103,55 @@ inline const Type *Type::getPointeeOrArrayElementType() const {
71037103
return type->getBaseElementTypeUnsafe();
71047104
return type;
71057105
}
7106+
/// Insertion operator for diagnostics. This allows sending address spaces into
7107+
/// a diagnostic with <<.
7108+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
7109+
LangAS AS) {
7110+
DB.AddTaggedVal(static_cast<std::underlying_type_t<LangAS>>(AS),
7111+
DiagnosticsEngine::ArgumentKind::ak_addrspace);
7112+
return DB;
7113+
}
7114+
71067115
/// Insertion operator for partial diagnostics. This allows sending adress
71077116
/// spaces into a diagnostic with <<.
7108-
inline const StreamableDiagnosticBase &
7109-
operator<<(const StreamableDiagnosticBase &PD, LangAS AS) {
7117+
inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
7118+
LangAS AS) {
71107119
PD.AddTaggedVal(static_cast<std::underlying_type_t<LangAS>>(AS),
71117120
DiagnosticsEngine::ArgumentKind::ak_addrspace);
71127121
return PD;
71137122
}
71147123

7124+
/// Insertion operator for diagnostics. This allows sending Qualifiers into a
7125+
/// diagnostic with <<.
7126+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
7127+
Qualifiers Q) {
7128+
DB.AddTaggedVal(Q.getAsOpaqueValue(),
7129+
DiagnosticsEngine::ArgumentKind::ak_qual);
7130+
return DB;
7131+
}
7132+
71157133
/// Insertion operator for partial diagnostics. This allows sending Qualifiers
71167134
/// into a diagnostic with <<.
7117-
inline const StreamableDiagnosticBase &
7118-
operator<<(const StreamableDiagnosticBase &PD, Qualifiers Q) {
7135+
inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
7136+
Qualifiers Q) {
71197137
PD.AddTaggedVal(Q.getAsOpaqueValue(),
71207138
DiagnosticsEngine::ArgumentKind::ak_qual);
71217139
return PD;
71227140
}
71237141

7142+
/// Insertion operator for diagnostics. This allows sending QualType's into a
7143+
/// diagnostic with <<.
7144+
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
7145+
QualType T) {
7146+
DB.AddTaggedVal(reinterpret_cast<intptr_t>(T.getAsOpaquePtr()),
7147+
DiagnosticsEngine::ak_qualtype);
7148+
return DB;
7149+
}
7150+
71247151
/// Insertion operator for partial diagnostics. This allows sending QualType's
71257152
/// into a diagnostic with <<.
7126-
inline const StreamableDiagnosticBase &
7127-
operator<<(const StreamableDiagnosticBase &PD, QualType T) {
7153+
inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
7154+
QualType T) {
71287155
PD.AddTaggedVal(reinterpret_cast<intptr_t>(T.getAsOpaquePtr()),
71297156
DiagnosticsEngine::ak_qualtype);
71307157
return PD;

clang/include/clang/Basic/BuiltinsPPC.def

+6
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ BUILTIN(__builtin_altivec_vexpandwm, "V4UiV4Ui", "")
329329
BUILTIN(__builtin_altivec_vexpanddm, "V2ULLiV2ULLi", "")
330330
BUILTIN(__builtin_altivec_vexpandqm, "V1ULLLiV1ULLLi", "")
331331

332+
// P10 Vector Count with Mask built-ins.
333+
BUILTIN(__builtin_altivec_vcntmbb, "ULLiV16UcUi", "")
334+
BUILTIN(__builtin_altivec_vcntmbh, "ULLiV8UsUi", "")
335+
BUILTIN(__builtin_altivec_vcntmbw, "ULLiV4UiUi", "")
336+
BUILTIN(__builtin_altivec_vcntmbd, "ULLiV2ULLiUi", "")
337+
332338
// P10 Vector Parallel Bits built-ins.
333339
BUILTIN(__builtin_altivec_vpdepd, "V2ULLiV2ULLiV2ULLi", "")
334340
BUILTIN(__builtin_altivec_vpextd, "V2ULLiV2ULLiV2ULLi", "")

0 commit comments

Comments
 (0)