diff options
author | Nick Kledzik <kledzik@apple.com> | 2013-11-14 00:59:59 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2013-11-14 00:59:59 +0000 |
commit | 4e7c22a90b28828e4a28751b65ae24091f7df4ec (patch) | |
tree | 831df9922e1cdd3f1537c3f9df0fc557eabc5aac /include | |
parent | 4bd0224887a8de1434186cad2f618c18dea06c0b (diff) | |
download | llvm-4e7c22a90b28828e4a28751b65ae24091f7df4ec.tar.gz llvm-4e7c22a90b28828e4a28751b65ae24091f7df4ec.tar.bz2 llvm-4e7c22a90b28828e4a28751b65ae24091f7df4ec.tar.xz |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/YAMLTraits.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h index 98964fc002..6b6a8b7698 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 <typename T> 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 *&); |