versioner: replace availability attributes with annotate.

Major refactor to use __attribute__((annotate)) to be able to keep
track of the semantic differences between __INTRODUCED_IN(x) and
__INTRODUCED_IN_X86(x), for use in the upcoming preprocessor.

Bug: http://b/30170081
Change-Id: I6496a8c40ba7f4553de9a2be0bbddcf37c813937
diff --git a/tools/versioner/src/Utils.cpp b/tools/versioner/src/Utils.cpp
index 92cc9de..8dcadd1 100644
--- a/tools/versioner/src/Utils.cpp
+++ b/tools/versioner/src/Utils.cpp
@@ -21,9 +21,12 @@
 #include <string.h>
 #include <unistd.h>
 
+#include <sstream>
 #include <string>
 #include <vector>
 
+#include "DeclarationDatabase.h"
+
 std::string getWorkingDir() {
   char buf[PATH_MAX];
   if (!getcwd(buf, sizeof(buf))) {
@@ -54,3 +57,10 @@
   fts_close(fts);
   return files;
 }
+
+llvm::StringRef StripPrefix(llvm::StringRef string, llvm::StringRef prefix) {
+  if (string.startswith(prefix)) {
+    return string.drop_front(prefix.size());
+  }
+  return string;
+}