18#include "llvm/ADT/StringRef.h"
19#include "llvm/Support/ErrorHandling.h"
26 : Name(R->Name), USR(R->USR),
Record(R) {}
30#define RECORD_CONTEXT(CLASS, KIND) \
32 return static_cast<CLASS *>(const_cast<RecordContext *>(Ctx));
44 switch (
Record->getKind()) {
45#define RECORD_CONTEXT(CLASS, KIND) \
47 return static_cast<CLASS *>(const_cast<APIRecord *>(Record));
56bool RecordContext::IsWellFormed()
const {
58 return (First ==
nullptr) == (Last ==
nullptr);
62 assert(IsWellFormed());
65 Last->NextInContext =
Other.First;
72 Other.First =
nullptr;
77 assert(IsWellFormed());
84 Last->NextInContext =
Record;
92 auto FindIt = USRBasedLookupTable.find(USR);
93 if (FindIt != USRBasedLookupTable.end())
94 return FindIt->getSecond().get();
104 if (Allocator.identifyObject(String.data()))
107 void *Ptr = Allocator.Allocate(String.size(), 1);
108 memcpy(Ptr, String.data(), String.size());
109 return StringRef(
reinterpret_cast<const char *
>(Ptr), String.size());
121ObjCContainerRecord::~ObjCContainerRecord() {}
126void GlobalFunctionRecord::anchor() {}
127void GlobalVariableRecord::anchor() {}
128void EnumConstantRecord::anchor() {}
129void EnumRecord::anchor() {}
130void StructFieldRecord::anchor() {}
131void StructRecord::anchor() {}
132void UnionFieldRecord::anchor() {}
133void UnionRecord::anchor() {}
134void CXXFieldRecord::anchor() {}
135void CXXClassRecord::anchor() {}
136void CXXConstructorRecord::anchor() {}
137void CXXDestructorRecord::anchor() {}
138void CXXInstanceMethodRecord::anchor() {}
139void CXXStaticMethodRecord::anchor() {}
140void ObjCInstancePropertyRecord::anchor() {}
141void ObjCClassPropertyRecord::anchor() {}
142void ObjCInstanceVariableRecord::anchor() {}
143void ObjCInstanceMethodRecord::anchor() {}
144void ObjCClassMethodRecord::anchor() {}
145void ObjCCategoryRecord::anchor() {}
146void ObjCInterfaceRecord::anchor() {}
147void ObjCProtocolRecord::anchor() {}
148void MacroDefinitionRecord::anchor() {}
149void TypedefRecord::anchor() {}
This file defines the APIRecord-based structs and the APISet class.
llvm::MachO::Record Record
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
@ Other
Other implicit parameter.
Diagnostic wrappers for TextAPI types for error reporting.