versioner: Add versioner_fortify_inline annotation
This commit adds versioner_fortify_inline annotation. This annotation
indicates that the annotated function is an overloaded inline function
for _FORTIFY_SOURCE implementation. They are usually enabled/disabled
by the enable_if attribute, thus the versioner don't have to check
whether they have conflicting definitions.
Bug: 118991081
Test: source development/vndk/tools/header-checker/android/envsetup.sh && \
source build/envsetup.sh && \
lunch aosp_arm64-userdebug && \
m versioner && \
./bionic/tools/versioner/run_tests.py
Change-Id: If5c739fc0c8a218907855939c1fe5338134da7f7
diff --git a/tools/versioner/src/DeclarationDatabase.h b/tools/versioner/src/DeclarationDatabase.h
index 4496ee9..9a45227 100644
--- a/tools/versioner/src/DeclarationDatabase.h
+++ b/tools/versioner/src/DeclarationDatabase.h
@@ -127,6 +127,7 @@
bool is_extern;
bool is_definition;
bool no_guard;
+ bool fortify_inline;
std::map<CompilationType, DeclarationAvailability> availability;
bool calculateAvailability(DeclarationAvailability* output) const;
@@ -143,6 +144,9 @@
if (no_guard) {
fprintf(out, "no_guard ");
}
+ if (fortify_inline) {
+ fprintf(out, "fortify_inline ");
+ }
fprintf(out, "@ %s:%u:%u", StripPrefix(location.filename, base_path).str().c_str(),
location.start.line, location.start.column);