AAPT2: Shared library support

Test: make aapt2_tests
Change-Id: I98dddf1367e6c0ac425bb20be46e6ff05f4f2f45
diff --git a/tools/aapt2/ValueVisitor.h b/tools/aapt2/ValueVisitor.h
index 1cb6aa1..2763d49 100644
--- a/tools/aapt2/ValueVisitor.h
+++ b/tools/aapt2/ValueVisitor.h
@@ -29,7 +29,8 @@
 struct RawValueVisitor {
   virtual ~RawValueVisitor() = default;
 
-  virtual void VisitItem(Item* value) {}
+  virtual void VisitAny(Value* value) {}
+  virtual void VisitItem(Item* value) { VisitAny(value); }
   virtual void Visit(Reference* value) { VisitItem(value); }
   virtual void Visit(RawString* value) { VisitItem(value); }
   virtual void Visit(String* value) { VisitItem(value); }
@@ -38,11 +39,11 @@
   virtual void Visit(Id* value) { VisitItem(value); }
   virtual void Visit(BinaryPrimitive* value) { VisitItem(value); }
 
-  virtual void Visit(Attribute* value) {}
-  virtual void Visit(Style* value) {}
-  virtual void Visit(Array* value) {}
-  virtual void Visit(Plural* value) {}
-  virtual void Visit(Styleable* value) {}
+  virtual void Visit(Attribute* value) { VisitAny(value); }
+  virtual void Visit(Style* value) { VisitAny(value); }
+  virtual void Visit(Array* value) { VisitAny(value); }
+  virtual void Visit(Plural* value) { VisitAny(value); }
+  virtual void Visit(Styleable* value) { VisitAny(value); }
 };
 
 // NOLINT, do not add parentheses around T.