versioner: add support for __VERSIONER_NO_GUARD.
Add an attribute that tells the preprocessor not to guard a
declaration, primarily for use with symbols that get reexported by
libc++ of the form `namespace std { using ::wctrans; }`.
Bug: http://b/28178111
Change-Id: I08c8751214797e37e8f26e7f7416a19e81c2bb4c
diff --git a/tools/versioner/src/Preprocessor.cpp b/tools/versioner/src/Preprocessor.cpp
index 8d0b943..3c86486 100644
--- a/tools/versioner/src/Preprocessor.cpp
+++ b/tools/versioner/src/Preprocessor.cpp
@@ -452,6 +452,11 @@
const Location& location = decl_it.first;
const Declaration& decl = decl_it.second;
+ if (decl.no_guard) {
+ // No guard required.
+ continue;
+ }
+
DeclarationAvailability macro_guard = calculateRequiredGuard(decl);
if (!macro_guard.empty()) {
guards[location.filename][location] = macro_guard;