[llvm-commits] [llvm] r146971 - in /llvm/trunk: include/llvm/Support/JSONParser.h lib/Support/JSONParser.cpp
Chandler Carruth
chandlerc at google.com
Tue Dec 20 02:51:51 PST 2011
On Tue, Dec 20, 2011 at 2:42 AM, Manuel Klimek <klimek at google.com> wrote:
> Modified: llvm/trunk/lib/Support/JSONParser.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/JSONParser.cpp?rev=146971&r1=146970&r2=146971&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Support/JSONParser.cpp (original)
> +++ llvm/trunk/lib/Support/JSONParser.cpp Tue Dec 20 04:42:52 2011
> @@ -40,7 +40,30 @@
> }
>
> bool JSONParser::validate() {
> - return parseRoot()->skip();
> + return skip(*parseRoot());
> +}
> +
> +template <typename ContainerT>
> +bool JSONParser::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();
> +}
>
Again, you can't just define template functions in the source file. Until
this is de-templated, this definition needs to be available in the header.
=/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111220/c5952fb5/attachment.html>
More information about the llvm-commits
mailing list