|
@@ -930,6 +930,13 @@ bool Decl::AccessDeclContextSanity() const {
|
|
|
static Decl::Kind getKind(const Decl *D) { return D->getKind(); }
|
|
|
static Decl::Kind getKind(const DeclContext *DC) { return DC->getDeclKind(); }
|
|
|
|
|
|
+int64_t Decl::getID() const {
|
|
|
+ Optional<int64_t> Out = getASTContext().getAllocator().identifyObject(this);
|
|
|
+ assert(Out && "Wrong allocator used");
|
|
|
+ assert(*Out % alignof(Decl) == 0 && "Wrong alignment information");
|
|
|
+ return *Out / alignof(Decl);
|
|
|
+}
|
|
|
+
|
|
|
const FunctionType *Decl::getFunctionType(bool BlocksToo) const {
|
|
|
QualType Ty;
|
|
|
if (const auto *D = dyn_cast<ValueDecl>(this))
|