Merge "Add arm32 case to BIONIC_STOP_UNWIND to correctly stop unwinders"
diff --git a/tools/versioner/src/Arch.h b/tools/versioner/src/Arch.h
index 16fa265..e4bbcc4 100644
--- a/tools/versioner/src/Arch.h
+++ b/tools/versioner/src/Arch.h
@@ -138,7 +138,9 @@
   { Arch::x86_64, "x86_64-linux-android" },
 };
 
-static const std::set<int> default_levels = { 14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29 };
+static const std::set<int> default_levels = {
+  14, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30,
+};
 
 static const ArchMap<int> arch_min_api = {
   { Arch::arm, 9 },
@@ -165,4 +167,5 @@
   {"O-MR1", 27},
   {"P", 28},
   {"Q", 29},
+  {"R", 30},
 };
diff --git a/tools/versioner/src/Driver.cpp b/tools/versioner/src/Driver.cpp
index 3927480..d2c50a9 100644
--- a/tools/versioner/src/Driver.cpp
+++ b/tools/versioner/src/Driver.cpp
@@ -258,7 +258,7 @@
 
   Compiler.setInvocation(std::move(invocation));
   Compiler.setDiagnostics(diags.get());
-  Compiler.setVirtualFileSystem(vfs);
+  Compiler.createFileManager(vfs);
 
   VersionerASTAction versioner_action(header_database, type);
   if (!Compiler.ExecuteAction(versioner_action)) {
diff --git a/tools/versioner/src/SymbolFileParser.cpp b/tools/versioner/src/SymbolFileParser.cpp
index c312b48..1b4adae 100644
--- a/tools/versioner/src/SymbolFileParser.cpp
+++ b/tools/versioner/src/SymbolFileParser.cpp
@@ -266,19 +266,23 @@
     if (!api_level.empty()) {
       // If an api-level tag is specified, it must be an exact match (mainly
       // for versioner unit tests).
-      return compilation_type.api_level == decodeApiLevelValue(api_level);
+      return compilation_type.api_level == parseApiLevelValue(api_level);
     }
 
-    return compilation_type.api_level >= decodeApiLevelValue(intro);
+    return compilation_type.api_level >= parseApiLevelValue(intro);
   }
 
-  // Extract and decode the integer API level from api-level or introduced tags.
-  static int decodeApiLevelValue(const std::string& tag) {
+  // Parse the integer API level from api-level or introduced tags.
+  int parseApiLevelValue(const std::string& tag) const {
     std::string api_level = tag.substr(tag.find('=') + 1);
     auto it = api_codename_map.find(api_level);
     if (it != api_codename_map.end()) {
       return it->second;
     }
+    if (api_level.find_first_not_of("0123456789") != std::string::npos) {
+      errx(1, "%s:%zu: error: unknown API level codename specified: \"%s\"",
+           file_path.c_str(), curr_line_num, tag.c_str());
+    }
     return std::stoi(api_level);
   }