From d181f8bb043d5fa32501e342bd0dc420b93b43d0 Mon Sep 17 00:00:00 2001 From: Fred Emmott Date: Wed, 15 Apr 2020 15:46:45 -0700 Subject: [PATCH] Add note about what an annotation is to type-scanners Reviewed By: ricklavoie Differential Revision: D21043791 fbshipit-source-id: be91d6e858ca3bcbb30d30a4473733df1ff9ccf1 --- hphp/doc/hackers-guide/memory-management.md | 2 ++ hphp/tools/type-info-gens/gen-type-scanners.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hphp/doc/hackers-guide/memory-management.md b/hphp/doc/hackers-guide/memory-management.md index a088b44ef12..6a19298f8bc 100644 --- a/hphp/doc/hackers-guide/memory-management.md +++ b/hphp/doc/hackers-guide/memory-management.md @@ -33,3 +33,5 @@ primarily lives in [heap-collect.cpp](../../runtime/base/heap-collect.cpp) and [heap-scan.h](../../runtime/base/heap-scan.h), with [scanning code](https://github.com/facebook/hhvm/search?q=TYPE_SCAN_CUSTOM&unscoped_q=TYPE_SCAN_CUSTOM) spread throughout various other files, situated with the types being scanned. + +For information on annotations, see [type-scan.h](../../util/type-scan.h). diff --git a/hphp/tools/type-info-gens/gen-type-scanners.cpp b/hphp/tools/type-info-gens/gen-type-scanners.cpp index f706d83e86c..b886bd3dfa1 100644 --- a/hphp/tools/type-info-gens/gen-type-scanners.cpp +++ b/hphp/tools/type-info-gens/gen-type-scanners.cpp @@ -2917,7 +2917,9 @@ void Generator::checkForLayoutErrors() const { for (const auto& context : errors.context) { oss << "\t- " << context << "\n"; } - oss << "\t- from type '" << *indexed.type << "'\n\n"; + oss << "\t- from type '" << *indexed.type << "'\n" + "\t- if annotations are needed, see definitions in " + "hphp/util/type-scan.h.\n\n"; } // Error if an indexed type had internal linkage. for (const auto& address : indexed.addresses) { -- 2.11.4.GIT