Dumping Clang AST to a file
Monalisa Rout via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 9 05:03:01 PDT 2019
Hello, Currently I am dumping the Clang AST to the console but I want to
write it to a file.
I have pasted the code snippet.
bool HandleTopLevelDecl(DeclGroupRef DR) override {
for (DeclGroupRef::iterator b = DR.begin(), e = DR.end(); b != e; ++b) {
(*b)->dump(llvm::errs(), false,clang::ADOF_JSON);
}
return true;
}
How this can be done ?? Any help is appreciated.
Regards,
Mona
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190709/3874bd32/attachment-0001.html>
More information about the cfe-commits
mailing list