I am trying to use .pch as illustrated in the following example at http://clang.llvm.org/doxygen/group__CINDEX.html but it doesnot seem to work.
char *args[] = { "-Xclang", "-include-pch=IndexTest.pch" };
TU = clang_createTranslationUnitFromSourceFile(Idx, "IndexTest.c", 2, args, 0, 0);
libclang fails to read -include-pch flag, it is reading it as -include flag.
What I want is the following: My code depends on lots of headers. I want to parse and create Translation unit once and save it as pch file. Now I just want parsing to happen to a single file in question. Is it possible to do?