[llvm-commits] [llvm] r146971 - in /llvm/trunk: include/llvm/Support/JSONParser.h lib/Support/JSONParser.cpp
Manuel Klimek
klimek at google.com
Tue Dec 20 03:07:40 PST 2011
On Tue, Dec 20, 2011 at 11:51 AM, Chandler Carruth <chandlerc at google.com> wrote:
> 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.
> =/
Done.
More information about the llvm-commits
mailing list