diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-08-13 15:35:05 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-08-13 15:35:05 +0000 |
| commit | 6bb92ecc0a6326aa03e64c94a864b8915f61317f (patch) | |
| tree | ed3f6c97a441a19e68f4d94b0fbf6b8f1294d958 /clang/include/clang-c | |
| parent | c852cef1f2c7a4b6edd0a8b94d5fc21040dae083 (diff) | |
| download | bcm5719-llvm-6bb92ecc0a6326aa03e64c94a864b8915f61317f.tar.gz bcm5719-llvm-6bb92ecc0a6326aa03e64c94a864b8915f61317f.zip | |
Add an options parameter to clang_saveTranslationUnit, because we'll want it later
llvm-svn: 111016
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 4216e96c604..ff0d92a38c2 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -765,6 +765,31 @@ CINDEX_LINKAGE CXTranslationUnit clang_parseTranslationUnit(CXIndex CIdx, unsigned options); /** + * \brief Flags that control how translation units are saved. + * + * The enumerators in this enumeration type are meant to be bitwise + * ORed together to specify which options should be used when + * saving the translation unit. + */ +enum CXSaveTranslationUnit_Flags { + /** + * \brief Used to indicate that no special saving options are needed. + */ + CXSaveTranslationUnit_None = 0x0 +}; + +/** + * \brief Returns the set of flags that is suitable for saving a translation + * unit. + * + * The set of flags returned provide options for + * \c clang_saveTranslationUnit() by default. The returned flag + * set contains an unspecified set of options that save translation units with + * the most commonly-requested data. + */ +CINDEX_LINKAGE unsigned clang_defaultSaveOptions(CXTranslationUnit TU); + +/** * \brief Saves a translation unit into a serialized representation of * that translation unit on disk. * @@ -776,13 +801,19 @@ CINDEX_LINKAGE CXTranslationUnit clang_parseTranslationUnit(CXIndex CIdx, * 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 Zero if the translation unit was saved successfully, a * non-zero value otherwise. */ CINDEX_LINKAGE int clang_saveTranslationUnit(CXTranslationUnit TU, - const char *FileName); + const char *FileName, + unsigned options); /** * \brief Destroy the specified CXTranslationUnit object. |

