From 4e7c22a90b28828e4a28751b65ae24091f7df4ec Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Thu, 14 Nov 2013 00:59:59 +0000 Subject: Add simple support for tags in YAML I/O git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194644 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/YAMLTraits.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/llvm') diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h index 98964fc..6b6a8b7 100644 --- a/include/llvm/Support/YAMLTraits.h +++ b/include/llvm/Support/YAMLTraits.h @@ -330,6 +330,7 @@ public: virtual void postflightFlowElement(void*) = 0; virtual void endFlowSequence() = 0; + virtual bool mapTag(StringRef Tag, bool Default=false) = 0; virtual void beginMapping() = 0; virtual void endMapping() = 0; virtual bool preflightKey(const char*, bool, bool, bool &, void *&) = 0; @@ -404,8 +405,7 @@ public: void mapOptional(const char* Key, T& Val, const T& Default) { this->processKeyWithDefault(Key, Val, Default, false); } - - + private: template void processKeyWithDefault(const char *Key, T &Val, const T& DefaultValue, @@ -696,6 +696,7 @@ public: private: virtual bool outputting(); + virtual bool mapTag(StringRef, bool); virtual void beginMapping(); virtual void endMapping(); virtual bool preflightKey(const char *, bool, bool, bool &, void *&); @@ -819,6 +820,7 @@ public: virtual ~Output(); virtual bool outputting(); + virtual bool mapTag(StringRef, bool); virtual void beginMapping(); virtual void endMapping(); virtual bool preflightKey(const char *key, bool, bool, bool &, void *&); -- cgit v1.1