diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-07-14 08:20:46 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-07-14 08:20:46 +0000 |
commit | 9e5bb85ac899eeab7c21b5ff9030c3da6ff4837b (patch) | |
tree | 20b4a81817646d1b4944d3ebff2bb1efba855a62 /tools/libclang/CIndex.cpp | |
parent | 433db06b614f26dc6829e86d6ff469e2cca7d4f9 (diff) |
Move the rest of the preprocessor terminology from 'instantiate' and
variants to 'expand'. This changed a couple of public APIs, including
one public type "MacroInstantiation" which is now "MacroExpansion". The
rest of the codebase was updated to reflect this, especially the
libclang code. Two of the C++ (and thus easily changed) libclang APIs
were updated as well because they pertained directly to the old
MacroInstantiation class.
No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/libclang/CIndex.cpp')
-rw-r--r-- | tools/libclang/CIndex.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index b75850dd25..e85b94f4f7 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -544,8 +544,8 @@ bool CursorVisitor::VisitChildren(CXCursor Cursor) { // do so. PreprocessingRecord::iterator E, EEnd; for (llvm::tie(E, EEnd) = getPreprocessedEntities(); E != EEnd; ++E) { - if (MacroInstantiation *MI = dyn_cast<MacroInstantiation>(*E)) { - if (Visit(MakeMacroInstantiationCursor(MI, tu))) + if (MacroExpansion *ME = dyn_cast<MacroExpansion>(*E)) { + if (Visit(MakeMacroExpansionCursor(ME, tu))) return true; continue; @@ -3152,7 +3152,7 @@ CXString clang_getCursorSpelling(CXCursor C) { } if (C.kind == CXCursor_MacroInstantiation) - return createCXString(getCursorMacroInstantiation(C)->getName() + return createCXString(getCursorMacroExpansion(C)->getName() ->getNameStart()); if (C.kind == CXCursor_MacroDefinition) @@ -3674,7 +3674,7 @@ CXSourceLocation clang_getCursorLocation(CXCursor C) { if (C.kind == CXCursor_MacroInstantiation) { SourceLocation L - = cxcursor::getCursorMacroInstantiation(C)->getSourceRange().getBegin(); + = cxcursor::getCursorMacroExpansion(C)->getSourceRange().getBegin(); return cxloc::translateSourceLocation(getCursorContext(C), L); } @@ -3760,7 +3760,7 @@ static SourceRange getRawCursorExtent(CXCursor C) { return cxcursor::getCursorPreprocessingDirective(C); if (C.kind == CXCursor_MacroInstantiation) - return cxcursor::getCursorMacroInstantiation(C)->getSourceRange(); + return cxcursor::getCursorMacroExpansion(C)->getSourceRange(); if (C.kind == CXCursor_MacroDefinition) return cxcursor::getCursorMacroDefinition(C)->getSourceRange(); @@ -3877,7 +3877,7 @@ CXCursor clang_getCursorReferenced(CXCursor C) { } if (C.kind == CXCursor_MacroInstantiation) { - if (MacroDefinition *Def = getCursorMacroInstantiation(C)->getDefinition()) + if (MacroDefinition *Def = getCursorMacroExpansion(C)->getDefinition()) return MakeMacroDefinitionCursor(Def, tu); } |