diff options
Diffstat (limited to 'include/llvm/Support/JSONParser.h')
-rw-r--r-- | include/llvm/Support/JSONParser.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Support/JSONParser.h b/include/llvm/Support/JSONParser.h index 0150646bc3..f4cdfa5608 100644 --- a/include/llvm/Support/JSONParser.h +++ b/include/llvm/Support/JSONParser.h @@ -128,7 +128,16 @@ private: /// \brief Skips all elements in the given container. template <typename ContainerT> - bool skipContainer(const ContainerT &Container); + bool skipContainer(const ContainerT &Container) { + for (typename ContainerT::const_iterator I = Container.current(), + E = Container.end(); + I != E; ++I) { + assert(*I != 0); + if (!skip(**I)) + return false; + } + return !failed(); + } /// \brief Skips to the next position behind the given JSON atom. bool skip(const JSONAtom &Atom); |