c++ - How to increase clang parsing performance using PCH or PTH? -
c++ - How to increase clang parsing performance using PCH or PTH? -
i'm using clang c api parsing , getting diagnostics. i've noticed i'm using same bundle of headers time, i've decided seek utilize pch or pth increment performance.
but i'm getting diagnostics neither pch nor pth used while clang_parsetranslationunit:
i'm surprised pch , pth not used while parsing, how can utilize pch or pth or other approach increment parsing performance?
ps.
pth generated using clang++ -x c++-header iostream -emit-pth -o iostream.pth, pch in similar way
update 1:
i've found pch usage example:
// load symbols 'indextest.c', excluding symbols // 'indextest.pch'. char *args[] = { "-xclang", "-include-pch=indextest.pch" }; tu = clang_createtranslationunitfromsourcefile(idx, "indextest.c", 2, args, 0, 0); the problem i'm getting diagnostics warning:
'-pch=/system/include/libcxx/iostream.pch' file not found looks command-line arguments parsed incorrectly.. doing wrong?
c++ clang pch pth
Comments
Post a Comment