diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-07-25 16:49:02 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-07-25 16:49:02 +0000 |
commit | 402785357ab053dd53f4fdd858b9630a5e0f8bad (patch) | |
tree | 68d445a935324fbe002d22e1d18790497d275ba3 /lib/Frontend | |
parent | 1cbac8ac446cf513dbc7486dd50abd55bcfc62c6 (diff) |
Mechanically rename SourceManager::getInstantiationLoc and
FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part
of the API and documentation update from 'instantiation' as the term for
macros to 'expansion'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/DependencyFile.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/TextDiagnosticPrinter.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Frontend/DependencyFile.cpp b/lib/Frontend/DependencyFile.cpp index 9cffed2b35..8435864378 100644 --- a/lib/Frontend/DependencyFile.cpp +++ b/lib/Frontend/DependencyFile.cpp @@ -123,7 +123,7 @@ void DependencyFileCallback::FileChanged(SourceLocation Loc, SourceManager &SM = PP->getSourceManager(); const FileEntry *FE = - SM.getFileEntryForID(SM.getFileID(SM.getInstantiationLoc(Loc))); + SM.getFileEntryForID(SM.getFileID(SM.getExpansionLoc(Loc))); if (FE == 0) return; StringRef Filename = FE->getName(); diff --git a/lib/Frontend/TextDiagnosticPrinter.cpp b/lib/Frontend/TextDiagnosticPrinter.cpp index 83a1a37188..1f76659403 100644 --- a/lib/Frontend/TextDiagnosticPrinter.cpp +++ b/lib/Frontend/TextDiagnosticPrinter.cpp @@ -85,8 +85,8 @@ void TextDiagnosticPrinter::HighlightRange(const CharSourceRange &R, "Expect a correspondence between source and caret line!"); if (!R.isValid()) return; - SourceLocation Begin = SM.getInstantiationLoc(R.getBegin()); - SourceLocation End = SM.getInstantiationLoc(R.getEnd()); + SourceLocation Begin = SM.getExpansionLoc(R.getBegin()); + SourceLocation End = SM.getExpansionLoc(R.getEnd()); // If the End location and the start location are the same and are a macro // location, then the range was something that came from a macro expansion @@ -914,7 +914,7 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level, if (DiagOpts->ShowSourceRanges && Info.getNumRanges()) { FileID CaretFileID = - SM.getFileID(SM.getInstantiationLoc(Info.getLocation())); + SM.getFileID(SM.getExpansionLoc(Info.getLocation())); bool PrintedRange = false; for (unsigned i = 0, e = Info.getNumRanges(); i != e; ++i) { @@ -923,8 +923,8 @@ void TextDiagnosticPrinter::HandleDiagnostic(Diagnostic::Level Level, SourceLocation B = Info.getRange(i).getBegin(); SourceLocation E = Info.getRange(i).getEnd(); - B = SM.getInstantiationLoc(B); - E = SM.getInstantiationLoc(E); + B = SM.getExpansionLoc(B); + E = SM.getExpansionLoc(E); // If the End location and the start location are the same and are a // macro location, then the range was something that came from a |