summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2011-12-20 11:04:23 +0000
committerManuel Klimek <klimek@google.com>2011-12-20 11:04:23 +0000
commit093147abf423428d338979a839273369810698cc (patch)
tree00cad23560a4ad36ade27866b26a80dc21f0c121 /include
parent9ce6937701cd28fb2aafdd3ec950fb0e70bae8cd (diff)
downloadllvm-093147abf423428d338979a839273369810698cc.tar.gz
llvm-093147abf423428d338979a839273369810698cc.tar.bz2
llvm-093147abf423428d338979a839273369810698cc.tar.xz
Fixes a potential compilation error.
Pulling the template implementation into the header to guarantee that it's visible to all possible instantiations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/JSONParser.h11
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);