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:

argument unused during compilation: '-emit-pth' /tmp/system/include/libcxx/iostream.pth: 'linker' input unused argument unused during compilation: '-emit-pch' /tmp/system/include/libcxx/iostream.pch: 'linker' input unused

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

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -