Skip to content

Commit 36b12a8

Browse files
committed
Rename TypeNodes.def to TypeNodes.inc for consistency across all
our autogenerated files. NFC. As requested by Nico Weber. llvm-svn: 373425
1 parent 64a362e commit 36b12a8

25 files changed

+61
-61
lines changed

clang/include/clang/AST/ASTFwd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Stmt;
2424
#include "clang/AST/StmtNodes.inc"
2525
class Type;
2626
#define TYPE(DERIVED, BASE) class DERIVED##Type;
27-
#include "clang/AST/TypeNodes.def"
27+
#include "clang/AST/TypeNodes.inc"
2828
class CXXCtorInitializer;
2929

3030
} // end namespace clang

clang/include/clang/AST/ASTTypeTraits.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class ASTNodeKind {
148148
#include "clang/AST/StmtNodes.inc"
149149
NKI_Type,
150150
#define TYPE(DERIVED, BASE) NKI_##DERIVED##Type,
151-
#include "clang/AST/TypeNodes.def"
151+
#include "clang/AST/TypeNodes.inc"
152152
NKI_OMPClause,
153153
#define OPENMP_CLAUSE(TextualSpelling, Class) NKI_##Class,
154154
#include "clang/Basic/OpenMPKinds.def"
@@ -205,7 +205,7 @@ KIND_TO_KIND_ID(OMPClause)
205205
#define STMT(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED)
206206
#include "clang/AST/StmtNodes.inc"
207207
#define TYPE(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED##Type)
208-
#include "clang/AST/TypeNodes.def"
208+
#include "clang/AST/TypeNodes.inc"
209209
#define OPENMP_CLAUSE(TextualSpelling, Class) KIND_TO_KIND_ID(Class)
210210
#include "clang/Basic/OpenMPKinds.def"
211211
#undef KIND_TO_KIND_ID

clang/include/clang/AST/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ clang_tablegen(DeclNodes.inc -gen-clang-decl-nodes
3131
SOURCE ../Basic/DeclNodes.td
3232
TARGET ClangDeclNodes)
3333

34-
clang_tablegen(TypeNodes.def -gen-clang-type-nodes
34+
clang_tablegen(TypeNodes.inc -gen-clang-type-nodes
3535
SOURCE ../Basic/TypeNodes.td
3636
TARGET ClangTypeNodes)
3737

clang/include/clang/AST/RecursiveASTVisitor.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ template <typename Derived> class RecursiveASTVisitor {
431431
// Declare Traverse*() for all concrete Type classes.
432432
#define ABSTRACT_TYPE(CLASS, BASE)
433433
#define TYPE(CLASS, BASE) bool Traverse##CLASS##Type(CLASS##Type *T);
434-
#include "clang/AST/TypeNodes.def"
434+
#include "clang/AST/TypeNodes.inc"
435435
// The above header #undefs ABSTRACT_TYPE and TYPE upon exit.
436436

437437
// Define WalkUpFrom*() and empty Visit*() for all Type classes.
@@ -444,7 +444,7 @@ template <typename Derived> class RecursiveASTVisitor {
444444
return true; \
445445
} \
446446
bool Visit##CLASS##Type(CLASS##Type *T) { return true; }
447-
#include "clang/AST/TypeNodes.def"
447+
#include "clang/AST/TypeNodes.inc"
448448

449449
// ---- Methods on TypeLocs ----
450450
// FIXME: this currently just calls the matching Type methods
@@ -460,7 +460,7 @@ template <typename Derived> class RecursiveASTVisitor {
460460
bool VisitTypeLoc(TypeLoc TL) { return true; }
461461

462462
// QualifiedTypeLoc and UnqualTypeLoc are not declared in
463-
// TypeNodes.def and thus need to be handled specially.
463+
// TypeNodes.inc and thus need to be handled specially.
464464
bool WalkUpFromQualifiedTypeLoc(QualifiedTypeLoc TL) {
465465
return getDerived().VisitUnqualTypeLoc(TL.getUnqualifiedLoc());
466466
}
@@ -478,7 +478,7 @@ template <typename Derived> class RecursiveASTVisitor {
478478
return true; \
479479
} \
480480
bool Visit##CLASS##TypeLoc(CLASS##TypeLoc TL) { return true; }
481-
#include "clang/AST/TypeNodes.def"
481+
#include "clang/AST/TypeNodes.inc"
482482

483483
// ---- Methods on Decls ----
484484

@@ -676,7 +676,7 @@ bool RecursiveASTVisitor<Derived>::TraverseType(QualType T) {
676676
#define TYPE(CLASS, BASE) \
677677
case Type::CLASS: \
678678
DISPATCH(CLASS##Type, CLASS##Type, const_cast<Type *>(T.getTypePtr()));
679-
#include "clang/AST/TypeNodes.def"
679+
#include "clang/AST/TypeNodes.inc"
680680
}
681681

682682
return true;

clang/include/clang/AST/Type.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ using CanQualType = CanQual<Type>;
126126

127127
// Provide forward declarations for all of the *Type classes.
128128
#define TYPE(Class, Base) class Class##Type;
129-
#include "clang/AST/TypeNodes.def"
129+
#include "clang/AST/TypeNodes.inc"
130130

131131
/// The collection of all-type qualifiers we support.
132132
/// Clang supports five independent qualifiers:
@@ -1439,7 +1439,7 @@ class alignas(8) Type : public ExtQualsTypeCommonBase {
14391439
#define TYPE(Class, Base) Class,
14401440
#define LAST_TYPE(Class) TypeLast = Class
14411441
#define ABSTRACT_TYPE(Class, Base)
1442-
#include "clang/AST/TypeNodes.def"
1442+
#include "clang/AST/TypeNodes.inc"
14431443
};
14441444

14451445
private:
@@ -2419,7 +2419,7 @@ template <> inline const Class##Type *Type::getAs() const { \
24192419
template <> inline const Class##Type *Type::castAs() const { \
24202420
return cast<Class##Type>(CanonicalType); \
24212421
}
2422-
#include "clang/AST/TypeNodes.def"
2422+
#include "clang/AST/TypeNodes.inc"
24232423

24242424
/// This class is used for builtin types like 'int'. Builtin
24252425
/// types are always canonical and have a literal name field.

clang/include/clang/AST/TypeLoc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class TypeLoc {
106106
#define ABSTRACT_TYPE(Class, Base)
107107
#define TYPE(Class, Base) \
108108
Class = Type::Class,
109-
#include "clang/AST/TypeNodes.def"
109+
#include "clang/AST/TypeNodes.inc"
110110
Qualified
111111
};
112112

clang/include/clang/AST/TypeLocNodes.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
TYPELOC(Qualified, TypeLoc)
3232
#define TYPE(Class, Base) UNQUAL_TYPELOC(Class, Base##Loc)
3333
#define ABSTRACT_TYPE(Class, Base) ABSTRACT_TYPELOC(Class, Base##Loc)
34-
#include "clang/AST/TypeNodes.def"
34+
#include "clang/AST/TypeNodes.inc"
3535

3636
#undef DECLARATOR_TYPELOC
3737
#undef TYPESPEC_TYPELOC

clang/include/clang/AST/TypeVisitor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class TypeVisitor {
7070
switch (T->getTypeClass()) {
7171
#define ABSTRACT_TYPE(CLASS, PARENT)
7272
#define TYPE(CLASS, PARENT) case Type::CLASS: DISPATCH(CLASS##Type);
73-
#include "clang/AST/TypeNodes.def"
73+
#include "clang/AST/TypeNodes.inc"
7474
}
7575
llvm_unreachable("Unknown type class!");
7676
}
@@ -80,7 +80,7 @@ class TypeVisitor {
8080
#define TYPE(CLASS, PARENT) RetTy Visit##CLASS##Type(const CLASS##Type *T) { \
8181
DISPATCH(PARENT); \
8282
}
83-
#include "clang/AST/TypeNodes.def"
83+
#include "clang/AST/TypeNodes.inc"
8484

8585
/// Method called if \c ImpClass doesn't provide specific handler
8686
/// for some type class.

clang/lib/AST/ASTContext.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ void ASTContext::PrintStats() const {
977977
unsigned counts[] = {
978978
#define TYPE(Name, Parent) 0,
979979
#define ABSTRACT_TYPE(Name, Parent)
980-
#include "clang/AST/TypeNodes.def"
980+
#include "clang/AST/TypeNodes.inc"
981981
0 // Extra
982982
};
983983

@@ -997,7 +997,7 @@ void ASTContext::PrintStats() const {
997997
TotalBytes += counts[Idx] * sizeof(Name##Type); \
998998
++Idx;
999999
#define ABSTRACT_TYPE(Name, Parent)
1000-
#include "clang/AST/TypeNodes.def"
1000+
#include "clang/AST/TypeNodes.inc"
10011001

10021002
llvm::errs() << "Total bytes = " << TotalBytes << "\n";
10031003

@@ -1809,7 +1809,7 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
18091809
case Type::Class: \
18101810
assert(!T->isDependentType() && "should not see dependent types here"); \
18111811
return getTypeInfo(cast<Class##Type>(T)->desugar().getTypePtr());
1812-
#include "clang/AST/TypeNodes.def"
1812+
#include "clang/AST/TypeNodes.inc"
18131813
llvm_unreachable("Should not see dependent types");
18141814

18151815
case Type::FunctionNoProto:
@@ -3222,7 +3222,7 @@ QualType ASTContext::getVariableArrayDecayedType(QualType type) const {
32223222
#define TYPE(Class, Base)
32233223
#define ABSTRACT_TYPE(Class, Base)
32243224
#define NON_CANONICAL_TYPE(Class, Base) case Type::Class:
3225-
#include "clang/AST/TypeNodes.def"
3225+
#include "clang/AST/TypeNodes.inc"
32263226
llvm_unreachable("didn't desugar past all non-canonical types?");
32273227

32283228
// These types should never be variably-modified.
@@ -7124,7 +7124,7 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string &S,
71247124
case Type::KIND:
71257125
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(KIND, BASE) \
71267126
case Type::KIND:
7127-
#include "clang/AST/TypeNodes.def"
7127+
#include "clang/AST/TypeNodes.inc"
71287128
llvm_unreachable("@encode for dependent type!");
71297129
}
71307130
llvm_unreachable("bad type kind!");
@@ -8935,7 +8935,7 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS,
89358935
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base) case Type::Class:
89368936
#define NON_CANONICAL_TYPE(Class, Base) case Type::Class:
89378937
#define DEPENDENT_TYPE(Class, Base) case Type::Class:
8938-
#include "clang/AST/TypeNodes.def"
8938+
#include "clang/AST/TypeNodes.inc"
89398939
llvm_unreachable("Non-canonical and dependent types shouldn't get here");
89408940

89418941
case Type::Auto:

clang/lib/AST/ASTDiagnostic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Underlying = CTy->desugar(); \
154154
} \
155155
break; \
156156
}
157-
#include "clang/AST/TypeNodes.def"
157+
#include "clang/AST/TypeNodes.inc"
158158
}
159159

160160
// If it wasn't sugared, we're done.

clang/lib/AST/ASTTypeTraits.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const ASTNodeKind::KindInfo ASTNodeKind::AllKindInfo[] = {
3737
#include "clang/AST/StmtNodes.inc"
3838
{ NKI_None, "Type" },
3939
#define TYPE(DERIVED, BASE) { NKI_##BASE, #DERIVED "Type" },
40-
#include "clang/AST/TypeNodes.def"
40+
#include "clang/AST/TypeNodes.inc"
4141
{ NKI_None, "OMPClause" },
4242
#define OPENMP_CLAUSE(TextualSpelling, Class) {NKI_OMPClause, #Class},
4343
#include "clang/Basic/OpenMPKinds.def"
@@ -104,7 +104,7 @@ ASTNodeKind ASTNodeKind::getFromNode(const Type &T) {
104104
#define TYPE(Class, Base) \
105105
case Type::Class: return ASTNodeKind(NKI_##Class##Type);
106106
#define ABSTRACT_TYPE(Class, Base)
107-
#include "clang/AST/TypeNodes.def"
107+
#include "clang/AST/TypeNodes.inc"
108108
}
109109
llvm_unreachable("invalid type kind");
110110
}

clang/lib/AST/ExprConstant.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6256,7 +6256,7 @@ class BufferToAPValueConverter {
62566256
#define NON_CANONICAL_UNLESS_DEPENDENT(Class, Base) \
62576257
case Type::Class: \
62586258
llvm_unreachable("either dependent or not canonical!");
6259-
#include "clang/AST/TypeNodes.def"
6259+
#include "clang/AST/TypeNodes.inc"
62606260
}
62616261
llvm_unreachable("Unhandled Type::TypeClass");
62626262
}
@@ -9637,7 +9637,7 @@ EvaluateBuiltinClassifyType(QualType T, const LangOptions &LangOpts) {
96379637
#define DEPENDENT_TYPE(ID, BASE) case Type::ID:
96389638
#define NON_CANONICAL_TYPE(ID, BASE) case Type::ID:
96399639
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(ID, BASE) case Type::ID:
9640-
#include "clang/AST/TypeNodes.def"
9640+
#include "clang/AST/TypeNodes.inc"
96419641
case Type::Auto:
96429642
case Type::DeducedTemplateSpecialization:
96439643
llvm_unreachable("unexpected non-canonical or dependent type");

clang/lib/AST/ItaniumMangle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ class CXXNameMangler {
516516
#define ABSTRACT_TYPE(CLASS, PARENT)
517517
#define NON_CANONICAL_TYPE(CLASS, PARENT)
518518
#define TYPE(CLASS, PARENT) void mangleType(const CLASS##Type *T);
519-
#include "clang/AST/TypeNodes.def"
519+
#include "clang/AST/TypeNodes.inc"
520520

521521
void mangleType(const TagType*);
522522
void mangleType(TemplateName);
@@ -2499,7 +2499,7 @@ void CXXNameMangler::mangleType(QualType T) {
24992499
case Type::CLASS: \
25002500
mangleType(static_cast<const CLASS##Type*>(ty)); \
25012501
break;
2502-
#include "clang/AST/TypeNodes.def"
2502+
#include "clang/AST/TypeNodes.inc"
25032503
}
25042504
}
25052505

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ class MicrosoftCXXNameMangler {
364364
#define TYPE(CLASS, PARENT) void mangleType(const CLASS##Type *T, \
365365
Qualifiers Quals, \
366366
SourceRange Range);
367-
#include "clang/AST/TypeNodes.def"
367+
#include "clang/AST/TypeNodes.inc"
368368
#undef ABSTRACT_TYPE
369369
#undef NON_CANONICAL_TYPE
370370
#undef TYPE
@@ -1941,7 +1941,7 @@ void MicrosoftCXXNameMangler::mangleType(QualType T, SourceRange Range,
19411941
case Type::CLASS: \
19421942
mangleType(cast<CLASS##Type>(ty), Quals, Range); \
19431943
break;
1944-
#include "clang/AST/TypeNodes.def"
1944+
#include "clang/AST/TypeNodes.inc"
19451945
#undef ABSTRACT_TYPE
19461946
#undef NON_CANONICAL_TYPE
19471947
#undef TYPE

0 commit comments

Comments
 (0)