Skip to content

Commit 3c74232

Browse files
committed
Merge from 'master' to 'sycl-web' (#1)
CONFLICT (content): Merge conflict in llvm/lib/Passes/StandardInstrumentations.cpp
2 parents e742845 + b03c2b8 commit 3c74232

File tree

293 files changed

+7967
-1597
lines changed

Some content is hidden

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

293 files changed

+7967
-1597
lines changed

clang/include/clang/AST/APValue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ class APValue {
174174
return !(LHS == RHS);
175175
}
176176
friend llvm::hash_code hash_value(const LValueBase &Base);
177+
friend struct llvm::DenseMapInfo<LValueBase>;
177178

178179
private:
179180
PtrTy Ptr;
@@ -201,8 +202,7 @@ class APValue {
201202

202203
public:
203204
LValuePathEntry() : Value() {}
204-
LValuePathEntry(BaseOrMemberType BaseOrMember)
205-
: Value{reinterpret_cast<uintptr_t>(BaseOrMember.getOpaqueValue())} {}
205+
LValuePathEntry(BaseOrMemberType BaseOrMember);
206206
static LValuePathEntry ArrayIndex(uint64_t Index) {
207207
LValuePathEntry Result;
208208
Result.Value = Index;

clang/include/clang/AST/ASTContext.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3069,8 +3069,9 @@ OPT_LIST(V)
30693069
};
30703070

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

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

clang/include/clang/AST/Attr.h

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,19 +351,12 @@ struct ParsedTargetAttr {
351351

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

354-
inline const DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
355-
const Attr *At) {
354+
inline const StreamableDiagnosticBase &
355+
operator<<(const StreamableDiagnosticBase &DB, 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-
}
367360
} // end namespace clang
368361

369362
#endif

clang/include/clang/AST/CanonicalType.h

Lines changed: 2 additions & 2 deletions
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 DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
219-
CanQualType T) {
218+
inline const StreamableDiagnosticBase &
219+
operator<<(const StreamableDiagnosticBase &DB, CanQualType T) {
220220
DB << static_cast<QualType>(T);
221221
return DB;
222222
}

clang/include/clang/AST/Decl.h

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

45154515
/// Insertion operator for diagnostics. This allows sending NamedDecl's
45164516
/// into a diagnostic with <<.
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) {
4517+
inline const StreamableDiagnosticBase &
4518+
operator<<(const StreamableDiagnosticBase &PD, const NamedDecl *ND) {
45254519
PD.AddTaggedVal(reinterpret_cast<intptr_t>(ND),
45264520
DiagnosticsEngine::ak_nameddecl);
45274521
return PD;

clang/include/clang/AST/DeclCXX.h

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

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

40794076
} // namespace clang
40804077

clang/include/clang/AST/DeclarationName.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -811,19 +811,10 @@ 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-
823814
/// Insertion operator for partial diagnostics. This allows binding
824815
/// DeclarationName's into a partial diagnostic with <<.
825-
inline const PartialDiagnostic &operator<<(const PartialDiagnostic &PD,
826-
DeclarationName N) {
816+
inline const StreamableDiagnosticBase &
817+
operator<<(const StreamableDiagnosticBase &PD, DeclarationName N) {
827818
PD.AddTaggedVal(N.getAsOpaqueInteger(),
828819
DiagnosticsEngine::ak_declarationname);
829820
return PD;

clang/include/clang/AST/NestedNameSpecifier.h

Lines changed: 2 additions & 2 deletions
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 DiagnosticBuilder &operator<<(const DiagnosticBuilder &DB,
523-
NestedNameSpecifier *NNS) {
522+
inline const StreamableDiagnosticBase &
523+
operator<<(const StreamableDiagnosticBase &DB, NestedNameSpecifier *NNS) {
524524
DB.AddTaggedVal(reinterpret_cast<intptr_t>(NNS),
525525
DiagnosticsEngine::ak_nestednamespec);
526526
return DB;

clang/include/clang/AST/OpenMPClause.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7856,6 +7856,23 @@ class OMPTraitInfo {
78567856
/// Return a string representation identifying this context selector.
78577857
std::string getMangledName() const;
78587858

7859+
/// Check the extension trait \p TP is active.
7860+
bool isExtensionActive(llvm::omp::TraitProperty TP) {
7861+
for (const OMPTraitSet &Set : Sets) {
7862+
if (Set.Kind != llvm::omp::TraitSet::implementation)
7863+
continue;
7864+
for (const OMPTraitSelector &Selector : Set.Selectors) {
7865+
if (Selector.Kind != llvm::omp::TraitSelector::implementation_extension)
7866+
continue;
7867+
for (const OMPTraitProperty &Property : Selector.Properties) {
7868+
if (Property.Kind == TP)
7869+
return true;
7870+
}
7871+
}
7872+
}
7873+
return false;
7874+
}
7875+
78597876
/// Print a human readable representation into \p OS.
78607877
void print(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const;
78617878
};

clang/include/clang/AST/TemplateBase.h

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

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

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

0 commit comments

Comments
 (0)