clang_saveTranslationUnit

Saves a translation unit into a serialized representation of that translation unit on disk.

Any translation unit that was parsed without error can be saved into a file. The translation unit can then be deserialized into a new \c CXTranslationUnit with \c clang_createTranslationUnit() or, if it is an incomplete translation unit that corresponds to a header, used as a precompiled header when parsing other translation units.

\param TU The translation unit to save.

\param FileName The file to which the translation unit will be saved.

\param options A bitmask of options that affects how the translation unit is saved. This should be a bitwise OR of the CXSaveTranslationUnit_XXX flags.

\returns A value that will match one of the enumerators of the CXSaveError enumeration. Zero (CXSaveError_None) indicates that the translation unit was saved successfully, while a non-zero value indicates that a problem occurred.

extern (C)
int
clang_saveTranslationUnit
(,
const(char)* FileName
,
uint options
)

Meta