Skip to content

Commit f783487

Browse files
authored
Merge pull request #27 from schweitzpgi/master
merge latest changes from clang (master branch)
2 parents b47f06e + c4a9a48 commit f783487

File tree

270 files changed

+11115
-7943
lines changed

Some content is hidden

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

270 files changed

+11115
-7943
lines changed

cmake/caches/Fuchsia.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ set(CLANG_BOOTSTRAP_TARGETS
3838
clang-test-depends
3939
distribution
4040
install-distribution
41+
install-distribution-stripped
4142
clang CACHE STRING "")
4243

4344
get_cmake_property(variableNames VARIABLES)

examples/clang-interpreter/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set(LLVM_LINK_COMPONENTS
33
ExecutionEngine
44
MC
55
MCJIT
6+
Object
67
OrcJit
78
Option
89
RuntimeDyld

include/clang-c/Index.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3182,8 +3182,14 @@ enum CXTypeKind {
31823182
CXType_Float128 = 30,
31833183
CXType_Half = 31,
31843184
CXType_Float16 = 32,
3185+
CXType_ShortAccum = 33,
3186+
CXType_Accum = 34,
3187+
CXType_LongAccum = 35,
3188+
CXType_UShortAccum = 36,
3189+
CXType_UAccum = 37,
3190+
CXType_ULongAccum = 38,
31853191
CXType_FirstBuiltin = CXType_Void,
3186-
CXType_LastBuiltin = CXType_Float16,
3192+
CXType_LastBuiltin = CXType_ULongAccum,
31873193

31883194
CXType_Complex = 100,
31893195
CXType_Pointer = 101,

include/clang/AST/ASTContext.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,9 @@ class ASTContext : public RefCountedBase<ASTContext> {
10071007
CanQualType UnsignedCharTy, UnsignedShortTy, UnsignedIntTy, UnsignedLongTy;
10081008
CanQualType UnsignedLongLongTy, UnsignedInt128Ty;
10091009
CanQualType FloatTy, DoubleTy, LongDoubleTy, Float128Ty;
1010+
CanQualType ShortAccumTy, AccumTy,
1011+
LongAccumTy; // ISO/IEC JTC1 SC22 WG14 N1169 Extension
1012+
CanQualType UnsignedShortAccumTy, UnsignedAccumTy, UnsignedLongAccumTy;
10101013
CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON
10111014
CanQualType Float16Ty; // C11 extension ISO/IEC TS 18661-3
10121015
CanQualType FloatComplexTy, DoubleComplexTy, LongDoubleComplexTy;

include/clang/AST/BuiltinTypes.def

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,26 @@ SIGNED_TYPE(LongLong, LongLongTy)
122122
// '__int128_t'
123123
SIGNED_TYPE(Int128, Int128Ty)
124124

125+
//===- Fixed point types --------------------------------------------------===//
126+
127+
// 'short _Accum'
128+
SIGNED_TYPE(ShortAccum, ShortAccumTy)
129+
130+
// '_Accum'
131+
SIGNED_TYPE(Accum, AccumTy)
132+
133+
// 'long _Accum'
134+
SIGNED_TYPE(LongAccum, LongAccumTy)
135+
136+
// 'unsigned short _Accum'
137+
UNSIGNED_TYPE(UShortAccum, UnsignedShortAccumTy)
138+
139+
// 'unsigned _Accum'
140+
UNSIGNED_TYPE(UAccum, UnsignedAccumTy)
141+
142+
// 'unsigned long _Accum'
143+
UNSIGNED_TYPE(ULongAccum, UnsignedLongAccumTy)
144+
125145
//===- Floating point types -----------------------------------------------===//
126146

127147
// 'half' in OpenCL, '__fp16' in ARM NEON.

include/clang/AST/DeclCXX.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,21 @@ class CXXRecordDecl : public RecordDecl {
751751
return const_cast<CXXRecordDecl*>(this)->getMostRecentDecl();
752752
}
753753

754+
CXXRecordDecl *getMostRecentNonInjectedDecl() {
755+
CXXRecordDecl *Recent =
756+
static_cast<CXXRecordDecl *>(this)->getMostRecentDecl();
757+
while (Recent->isInjectedClassName()) {
758+
// FIXME: Does injected class name need to be in the redeclarations chain?
759+
assert(Recent->getPreviousDecl());
760+
Recent = Recent->getPreviousDecl();
761+
}
762+
return Recent;
763+
}
764+
765+
const CXXRecordDecl *getMostRecentNonInjectedDecl() const {
766+
return const_cast<CXXRecordDecl*>(this)->getMostRecentNonInjectedDecl();
767+
}
768+
754769
CXXRecordDecl *getDefinition() const {
755770
// We only need an update if we don't already know which
756771
// declaration is the definition.

include/clang/AST/DeclOpenMP.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ class OMPCapturedExprDecl final : public VarDecl {
189189
void anchor() override;
190190

191191
OMPCapturedExprDecl(ASTContext &C, DeclContext *DC, IdentifierInfo *Id,
192-
QualType Type, SourceLocation StartLoc)
193-
: VarDecl(OMPCapturedExpr, C, DC, StartLoc, StartLoc, Id, Type, nullptr,
192+
QualType Type, TypeSourceInfo *TInfo,
193+
SourceLocation StartLoc)
194+
: VarDecl(OMPCapturedExpr, C, DC, StartLoc, StartLoc, Id, Type, TInfo,
194195
SC_None) {
195196
setImplicit();
196197
}

include/clang/AST/DeclTemplate.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,14 +1720,8 @@ class ClassTemplateSpecializationDecl
17201720
// it's not clear that we should override that, because the most recent
17211721
// declaration as a CXXRecordDecl sometimes is the injected-class-name.
17221722
ClassTemplateSpecializationDecl *getMostRecentDecl() {
1723-
CXXRecordDecl *Recent = static_cast<CXXRecordDecl *>(
1724-
this)->getMostRecentDecl();
1725-
while (!isa<ClassTemplateSpecializationDecl>(Recent)) {
1726-
// FIXME: Does injected class name need to be in the redeclarations chain?
1727-
assert(Recent->isInjectedClassName() && Recent->getPreviousDecl());
1728-
Recent = Recent->getPreviousDecl();
1729-
}
1730-
return cast<ClassTemplateSpecializationDecl>(Recent);
1723+
return cast<ClassTemplateSpecializationDecl>(
1724+
getMostRecentNonInjectedDecl());
17311725
}
17321726

17331727
/// Retrieve the template that this specialization specializes.

include/clang/AST/Stmt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ class CapturedStmt : public Stmt {
21332133

21342134
/// The pointer part is the implicit the outlined function and the
21352135
/// int part is the captured region kind, 'CR_Default' etc.
2136-
llvm::PointerIntPair<CapturedDecl *, 1, CapturedRegionKind> CapDeclAndKind;
2136+
llvm::PointerIntPair<CapturedDecl *, 2, CapturedRegionKind> CapDeclAndKind;
21372137

21382138
/// The record for captured variables, a RecordDecl or CXXRecordDecl.
21392139
RecordDecl *TheRecordDecl = nullptr;

include/clang/AST/VTableBuilder.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,6 @@ class VTableComponent {
9393
reinterpret_cast<uintptr_t>(MD));
9494
}
9595

96-
static VTableComponent getFromOpaqueInteger(uint64_t I) {
97-
return VTableComponent(I);
98-
}
99-
10096
/// Get the kind of this vtable component.
10197
Kind getKind() const {
10298
return (Kind)(Value & 0x7);
@@ -226,9 +222,6 @@ class VTableComponent {
226222
return static_cast<uintptr_t>(Value & ~7ULL);
227223
}
228224

229-
explicit VTableComponent(uint64_t Value)
230-
: Value(Value) { }
231-
232225
/// The kind is stored in the lower 3 bits of the value. For offsets, we
233226
/// make use of the facts that classes can't be larger than 2^55 bytes,
234227
/// so we store the offset in the lower part of the 61 bits that remain.

0 commit comments

Comments
 (0)