Skip to content

Commit e5a7d27

Browse files
committed
[NFC][clang][extract-api] Add missing virtual anchors
Add missing virtual method anchors for structs in ExtractAPI/API.h
1 parent df0b893 commit e5a7d27

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

clang/include/clang/ExtractAPI/API.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ struct EnumConstantRecord : APIRecord {
142142
static bool classof(const APIRecord *Record) {
143143
return Record->getKind() == RK_EnumConstant;
144144
}
145+
146+
private:
147+
virtual void anchor();
145148
};
146149

147150
/// This holds information associated with enums.
@@ -157,6 +160,9 @@ struct EnumRecord : APIRecord {
157160
static bool classof(const APIRecord *Record) {
158161
return Record->getKind() == RK_Enum;
159162
}
163+
164+
private:
165+
virtual void anchor();
160166
};
161167

162168
/// This holds information associated with struct fields.
@@ -171,6 +177,9 @@ struct StructFieldRecord : APIRecord {
171177
static bool classof(const APIRecord *Record) {
172178
return Record->getKind() == RK_StructField;
173179
}
180+
181+
private:
182+
virtual void anchor();
174183
};
175184

176185
/// This holds information associated with structs.
@@ -187,6 +196,9 @@ struct StructRecord : APIRecord {
187196
static bool classof(const APIRecord *Record) {
188197
return Record->getKind() == RK_Struct;
189198
}
199+
200+
private:
201+
virtual void anchor();
190202
};
191203

192204
/// APISet holds the set of API records collected from given inputs.

clang/lib/ExtractAPI/API.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,7 @@ StringRef APISet::copyString(StringRef String) {
131131
APIRecord::~APIRecord() {}
132132

133133
void GlobalRecord::anchor() {}
134+
void EnumConstantRecord::anchor() {}
135+
void EnumRecord::anchor() {}
136+
void StructFieldRecord::anchor() {}
137+
void StructRecord::anchor() {}

0 commit comments

Comments
 (0)