diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-07-14 09:02:10 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-07-14 09:02:10 +0000 |
commit | de81fc8557a82101b21a32e34ebd19cfc634c826 (patch) | |
tree | 75425d9fd9542cf7355c452df2bbe90b121b2531 /clang/tools | |
parent | 9e4704ab07d28bd6d507d9d3861b3bd2076deaaa (diff) | |
download | bcm5719-llvm-de81fc8557a82101b21a32e34ebd19cfc634c826.tar.gz bcm5719-llvm-de81fc8557a82101b21a32e34ebd19cfc634c826.zip |
NestedMacroInstantiations -> NestedMacroExpansions
This is switches all the interfaces points (and most of the commenst
/ local variables I saw on my way through) regarding the
NestedMacroInstantiations bit.
The libclang enums corresponding to this state were renamed, but
a legacy enum was added with the old name, and the same value to keep
existing clients working. I've added a documentation blurb for it, but
let me know if there is a canonical way to document legacy elemenst of
the libclang interface.
No functionality changed here, even in tests.
llvm-svn: 135141
Diffstat (limited to 'clang/tools')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 2 | ||||
-rw-r--r-- | clang/tools/libclang/CIndex.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index e574b872ae2..6e0aaac73cc 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -38,7 +38,7 @@ static unsigned getDefaultParsingOptions() { if (getenv("CINDEXTEST_COMPLETION_CACHING")) options |= CXTranslationUnit_CacheCompletionResults; if (getenv("CINDEXTEST_NESTED_MACROS")) - options |= CXTranslationUnit_NestedMacroInstantiations; + options |= CXTranslationUnit_NestedMacroExpansions; return options; } diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index 02ef6f82c2a..c78584a3a72 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -2391,7 +2391,7 @@ clang_createTranslationUnitFromSourceFile(CXIndex CIdx, unsigned num_unsaved_files, struct CXUnsavedFile *unsaved_files) { unsigned Options = CXTranslationUnit_DetailedPreprocessingRecord | - CXTranslationUnit_NestedMacroInstantiations; + CXTranslationUnit_NestedMacroExpansions; return clang_parseTranslationUnit(CIdx, source_filename, command_line_args, num_command_line_args, unsaved_files, num_unsaved_files, @@ -2496,12 +2496,12 @@ static void clang_parseTranslationUnit_Impl(void *UserData) { Args->push_back(source_filename); // Do we need the detailed preprocessing record? - bool NestedMacroInstantiations = false; + bool NestedMacroExpansions = false; if (options & CXTranslationUnit_DetailedPreprocessingRecord) { Args->push_back("-Xclang"); Args->push_back("-detailed-preprocessing-record"); - NestedMacroInstantiations - = (options & CXTranslationUnit_NestedMacroInstantiations); + NestedMacroExpansions + = (options & CXTranslationUnit_NestedMacroExpansions); } unsigned NumErrors = Diags->getClient()->getNumErrors(); @@ -2521,7 +2521,7 @@ static void clang_parseTranslationUnit_Impl(void *UserData) { CacheCodeCompetionResults, CXXPrecompilePreamble, CXXChainedPCH, - NestedMacroInstantiations)); + NestedMacroExpansions)); if (NumErrors != Diags->getClient()->getNumErrors()) { // Make sure to check that 'Unit' is non-NULL. |