clang: lib/APINotes/APINotesFormat.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9#ifndef LLVM_CLANG_LIB_APINOTES_APINOTESFORMAT_H

10#define LLVM_CLANG_LIB_APINOTES_APINOTESFORMAT_H

11

13#include "llvm/ADT/PointerEmbeddedInt.h"

14#include "llvm/Bitcode/BitcodeConvenience.h"

15

17namespace api_notes {

18

20

21

23

24

25

26

28

31

32using IdentifierID = llvm::PointerEmbeddedInt<unsigned, 31>;

34

35using SelectorID = llvm::PointerEmbeddedInt<unsigned, 31>;

37

38

39

40

41

43

44

45

46

48

49

51

52

53

55

56

57

58

60

61

62

63

65

66

67

69

70

71

72

74

75

76

78

79

80

82

83

84

86

87

88

90

91

92

94

95

96

98};

99

100namespace control_block {

101

102

103enum {

108};

109

111 llvm::BCRecordLayout<METADATA,

112 llvm::BCFixed<16>,

113 llvm::BCFixed<16>

114 >;

115

117 llvm::BCBlob

118 >;

119

122 llvm::BCFixed<1>

123 >;

124

126 llvm::BCVBR<16>,

127 llvm::BCVBR<16>

128 >;

129}

130

131namespace identifier_block {

132enum {

134};

135

138 llvm::BCVBR<16>,

139 llvm::BCBlob

140 >;

141}

142

143namespace context_block {

144enum {

147};

148

151 llvm::BCVBR<16>,

152

153 llvm::BCBlob

154

155 >;

156

159 llvm::BCVBR<16>,

160 llvm::BCBlob

161 >;

162}

163

164namespace objc_property_block {

165enum {

167};

168

171 llvm::BCVBR<16>,

172 llvm::BCBlob

173

174 >;

175}

176

177namespace objc_method_block {

178enum {

180};

181

184 llvm::BCVBR<16>,

185

186 llvm::BCBlob

187

188

189 >;

190}

191

192namespace cxx_method_block {

193enum {

195};

196

199 llvm::BCVBR<16>,

200

201 llvm::BCBlob

202

203 >;

204}

205

206namespace field_block {

207enum {

209};

210

212 llvm::BCRecordLayout<FIELD_DATA,

213 llvm::BCVBR<16>,

214

215 llvm::BCBlob

216

217 >;

218}

219

220namespace objc_selector_block {

221enum {

223};

224

227 llvm::BCVBR<16>,

228

229 llvm::BCBlob

230

231 >;

232}

233

234namespace global_variable_block {

236

239 llvm::BCVBR<16>,

240 llvm::BCBlob

241 >;

242}

243

244namespace global_function_block {

246

249 llvm::BCVBR<16>,

250 llvm::BCBlob

251 >;

252}

253

254namespace tag_block {

256

258 llvm::BCRecordLayout<TAG_DATA,

259 llvm::BCVBR<16>,

260

261 llvm::BCBlob

262 >;

263}

264

265namespace typedef_block {

267

269 llvm::BCRecordLayout<TYPEDEF_DATA,

270 llvm::BCVBR<16>,

271

272 llvm::BCBlob

273 >;

274}

275

276namespace enum_constant_block {

278

281 llvm::BCVBR<16>,

282

283 llvm::BCBlob

284 >;

285}

286

287

291};

292

293

294

295

300

302

307

312

315 : ContextTableKey(ParentContext ? std::make_optional(ParentContext->id)

316 : std::nullopt,

318

322 }

323};

324

328}

329

330

331

335

337

340

343 : static_cast<uint32_t>(-1)),

345

348 }

349};

350

354}

355

356}

357}

358

359namespace llvm {

360template <> struct DenseMapInfo<clang::api_notes::StoredObjCSelector> {

362

365 {}};

366 }

367

370 {}};

371 }

372

373 static unsigned

376 hash = hash_combine(hash, Selector.Identifiers.size());

378 hash = hash_combine(hash, static_cast<unsigned>(piece));

379

380

381 return hash;

382 }

383

387 }

388};

389

390template <> struct DenseMapInfo<clang::api_notes::ContextTableKey> {

393 }

394

397 DenseMapInfo<uint32_t>::getTombstoneKey(),

398 DenseMapInfo<uint8_t>::getTombstoneKey(),

399 DenseMapInfo<uint32_t>::getTombstoneKey()};

400 }

401

404 }

405

408 return lhs == rhs;

409 }

410};

411

412template <> struct DenseMapInfo<clang::api_notes::SingleDeclTableKey> {

415 }

416

419 DenseMapInfo<uint32_t>::getTombstoneKey(),

420 DenseMapInfo<uint32_t>::getTombstoneKey()};

421 }

422

423 static unsigned

426 }

427

430 return lhs == rhs;

431 }

432};

433

434}

435

436#endif

enum clang::sema::@1727::IndirectLocalPathEntry::EntryKind Kind

Opaque context ID used to refer to an Objective-C class or protocol or a C++ namespace.

llvm::BCRecordLayout< CONTEXT_ID_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > ContextIDLayout

llvm::BCRecordLayout< CONTEXT_INFO_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > ContextInfoLayout

llvm::BCRecordLayout< SOURCE_FILE, llvm::BCVBR< 16 >, llvm::BCVBR< 16 > > SourceFileLayout

llvm::BCRecordLayout< MODULE_NAME, llvm::BCBlob > ModuleNameLayout

llvm::BCRecordLayout< MODULE_OPTIONS, llvm::BCFixed< 1 > > ModuleOptionsLayout

llvm::BCRecordLayout< METADATA, llvm::BCFixed< 16 >, llvm::BCFixed< 16 > > MetadataLayout

llvm::BCRecordLayout< CXX_METHOD_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > CXXMethodDataLayout

llvm::BCRecordLayout< ENUM_CONSTANT_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > EnumConstantDataLayout

llvm::BCRecordLayout< FIELD_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > FieldDataLayout

llvm::BCRecordLayout< GLOBAL_FUNCTION_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > GlobalFunctionDataLayout

llvm::BCRecordLayout< GLOBAL_VARIABLE_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > GlobalVariableDataLayout

llvm::BCRecordLayout< IDENTIFIER_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > IdentifierDataLayout

llvm::BCRecordLayout< OBJC_METHOD_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > ObjCMethodDataLayout

llvm::BCRecordLayout< OBJC_PROPERTY_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > ObjCPropertyDataLayout

llvm::BCRecordLayout< OBJC_SELECTOR_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > ObjCSelectorDataLayout

llvm::BCRecordLayout< TAG_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > TagDataLayout

llvm::BCRecordLayout< TYPEDEF_DATA, llvm::BCVBR< 16 >, llvm::BCBlob > TypedefDataLayout

llvm::BCVBR< 16 > SelectorIDField

llvm::PointerEmbeddedInt< unsigned, 31 > SelectorID

bool operator==(const CommonEntityInfo &LHS, const CommonEntityInfo &RHS)

const uint8_t kSwiftConforms

llvm::PointerEmbeddedInt< unsigned, 31 > IdentifierID

llvm::BCVBR< 16 > IdentifierIDField

const uint8_t kSwiftDoesNotConform

const uint16_t VERSION_MAJOR

API notes file major version number.

const unsigned char API_NOTES_SIGNATURE[]

Magic number for API notes files.

const uint16_t VERSION_MINOR

API notes file minor version number.

BlockID

The various types of blocks that can occur within a API notes file.

@ OBJC_CONTEXT_BLOCK_ID

The Objective-C context data block, which contains information about Objective-C classes and protocol...

@ TYPEDEF_BLOCK_ID

The typedef data block, which maps typedef names to information about the typedefs.

@ OBJC_PROPERTY_BLOCK_ID

The Objective-C property data block, which maps Objective-C (class name, property name) pairs to info...

@ ENUM_CONSTANT_BLOCK_ID

The enum constant data block, which maps enumerator names to information about the enumerators.

@ TAG_BLOCK_ID

The tag data block, which maps tag names to information about the tags.

@ OBJC_METHOD_BLOCK_ID

The Objective-C property data block, which maps Objective-C (class name, selector,...

@ FIELD_BLOCK_ID

The fields data block, which maps names fields of C records to information about the field.

@ OBJC_SELECTOR_BLOCK_ID

The Objective-C selector data block, which maps Objective-C selector names (# of pieces,...

@ CXX_METHOD_BLOCK_ID

The C++ method data block, which maps C++ (context id, method name) pairs to information about the me...

@ GLOBAL_FUNCTION_BLOCK_ID

The (global) functions data block, which maps global function names to information about the global f...

@ CONTROL_BLOCK_ID

The control block, which contains all of the information that needs to be validated prior to committi...

@ IDENTIFIER_BLOCK_ID

The identifier data block, which maps identifier strings to IDs.

@ GLOBAL_VARIABLE_BLOCK_ID

The global variables data block, which maps global variable names to information about the global var...

The JSON file list parser is used to communicate input to InstallAPI.

Diagnostic wrappers for TextAPI types for error reporting.

hash_code hash_value(const clang::tooling::dependencies::ModuleID &ID)

A stored Objective-C or C++ context, represented by the ID of its parent context, the kind of this co...

ContextTableKey(std::optional< Context > ParentContext, ContextKind Kind, uint32_t ContextID)

llvm::hash_code hashValue() const

ContextTableKey(uint32_t parentContextID, uint8_t contextKind, uint32_t contextID)

ContextTableKey(std::optional< ContextID > ParentContextID, ContextKind Kind, uint32_t ContextID)

A stored Objective-C or C++ declaration, represented by the ID of its parent context,...

SingleDeclTableKey(std::optional< Context > ParentCtx, IdentifierID NameID)

SingleDeclTableKey(uint32_t ParentContextID, uint32_t NameID)

llvm::hash_code hashValue() const

A stored Objective-C selector.

llvm::SmallVector< IdentifierID, 2 > Identifiers

static clang::api_notes::ContextTableKey getTombstoneKey()

static unsigned getHashValue(const clang::api_notes::ContextTableKey &value)

static clang::api_notes::ContextTableKey getEmptyKey()

static bool isEqual(const clang::api_notes::ContextTableKey &lhs, const clang::api_notes::ContextTableKey &rhs)

static bool isEqual(const clang::api_notes::SingleDeclTableKey &lhs, const clang::api_notes::SingleDeclTableKey &rhs)

static unsigned getHashValue(const clang::api_notes::SingleDeclTableKey &value)

static clang::api_notes::SingleDeclTableKey getEmptyKey()

static clang::api_notes::SingleDeclTableKey getTombstoneKey()

static clang::api_notes::StoredObjCSelector getEmptyKey()

static bool isEqual(const clang::api_notes::StoredObjCSelector &LHS, const clang::api_notes::StoredObjCSelector &RHS)

static clang::api_notes::StoredObjCSelector getTombstoneKey()

DenseMapInfo< unsigned > UnsignedInfo

static unsigned getHashValue(const clang::api_notes::StoredObjCSelector &Selector)