[cfe-dev] clang-cc -ast-print-xml errors
Craig Mortensen
mortay at apple.com
Wed Sep 16 13:19:58 PDT 2009
Hi Mike,
If I specify the -ast-print-xml, I'm assuming the output will be xml.
I think you're right about the pch-thing. At the beginning of the
output file, I see 'CPCH'
Removing the -emit-pch will cause an assertion during the creation of
the output xml file:
Assertion failed: (NodeStack.size() > 1 && "to much backtracking"),
function toParent, file DocumentXML.cpp, line 51.
...the incomplete output file is in fact xml and I can read the
contents. The file is simply incomplete because of the assertion.
This is the command I'm using (with the -emit-pch)
./clang-cc -ast-print-xml -emit-pch --mcpu=yonah -v -o /tmp/
output.xml -x=objective-c /System/Library/Frameworks/
Foundation.framework/Headers/Foundation.h
I would attach the output file here, but it's a few Mbs...
Craig
On Sep 15, 2009, at 5:44 PM, Mike Stump wrote:
> On Sep 15, 2009, at 5:33 PM, Craig Mortensen wrote:
>> On Sep 15, 2009, at 4:58 PM, Eli Friedman wrote:
>>
>>> That indicates that clang is using the headers from an older version
>> Yep. That was my problem. I didn't update the headers in /Developer/
>> user/lib/clang/1.0/include/
>>
>> Now that it completes successfully, the xml output file can't be read
>> because the encoding is unknown. I don't see where to specify the
>> encoding.
>
> Is the file written an xml file? I think -emit-pch might be hosing
> you.
More information about the cfe-dev
mailing list