HomePhabricator

[libclang] Allow to suspend a translation unit.

Description

[libclang] Allow to suspend a translation unit.

A suspended translation unit uses significantly less memory but on the
other side does not support any other calls than
clang_reparseTranslationUnit to resume it or
clang_disposeTranslationUnit to dispose it completely.

This helps IDEs to reduce the memory footprint. The data that is freed
by a call to clang_suspendTranslationUnit will be re-generated on the
next (re)parse anyway. Used with a preamble, this allows pretty fast
resumption of the translation unit for further use (compared to disposal
of the translation unit and a parse from scratch).

Patch by Nikolai Kosjar!

Details

Committed
erikjvMay 30 2017, 7:25 AM
Parents
rL304211: Fixup r304205 - Require PowerPC target
Branches
Unknown
Tags
Unknown