[cfe-dev] Check If AST File is Valid
Jonathan Turner
jonathan_d_turner at apple.com
Thu Jun 9 12:31:59 PDT 2011
I'm not sure if this is what you're looking for, but I see that ASTWriter::WriteAST (in lib/Serialization/ASTWriter.cpp) outputs a few characters as a file signature(which look like a magic number to me), which you can see at the top of the function definition.
Hope that helps,
Jonathan
On Jun 3, 2011, at 2:07 PM, svandyk wrote:
> I'm using AST files to make call graphs on a large project, and I'm having
> some trouble. I think it's because some of the files that I think are AST
> are, in fact, not.
>
> Does Clang have any easy way to tell if a file is a valid AST file?
>
> Thanks,
> Stephanie
>
> --
> View this message in context: http://clang-developers.42468.n3.nabble.com/Check-If-AST-File-is-Valid-tp3021379p3021379.html
> Sent from the Clang Developers mailing list archive at Nabble.com.
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list