summaryrefslogtreecommitdiffstats
path: root/clang/lib/Rewrite
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 07:36:28 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 07:36:28 +0000
commit8a42586c54f6ec33b657d2c052740fdb52ce3a6c (patch)
tree457d3b7e94e51e302cb361e9029b43aeee644003 /clang/lib/Rewrite
parent3c91971b3391a6aa7f48ee11986813204006adf9 (diff)
downloadbcm5719-llvm-8a42586c54f6ec33b657d2c052740fdb52ce3a6c.tar.gz
bcm5719-llvm-8a42586c54f6ec33b657d2c052740fdb52ce3a6c.zip
more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location. llvm-svn: 62316
Diffstat (limited to 'clang/lib/Rewrite')
-rw-r--r--clang/lib/Rewrite/HTMLRewrite.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Rewrite/HTMLRewrite.cpp b/clang/lib/Rewrite/HTMLRewrite.cpp
index 67afc08b9fd..a605a1e6655 100644
--- a/clang/lib/Rewrite/HTMLRewrite.cpp
+++ b/clang/lib/Rewrite/HTMLRewrite.cpp
@@ -31,8 +31,8 @@ using namespace clang;
void html::HighlightRange(Rewriter &R, SourceLocation B, SourceLocation E,
const char *StartTag, const char *EndTag) {
SourceManager &SM = R.getSourceMgr();
- B = SM.getLogicalLoc(B);
- E = SM.getLogicalLoc(E);
+ B = SM.getInstantiationLoc(B);
+ E = SM.getInstantiationLoc(E);
unsigned FileID = SM.getCanonicalFileID(B);
assert(SM.getCanonicalFileID(E) == FileID && "B/E not in the same file!");
@@ -442,8 +442,8 @@ void html::HighlightMacros(Rewriter &R, unsigned FileID, Preprocessor& PP) {
continue;
}
- // Ignore tokens whose logical location was not the main file.
- SourceLocation LLoc = SourceMgr.getLogicalLoc(Tok.getLocation());
+ // Ignore tokens whose instantiation location was not the main file.
+ SourceLocation LLoc = SourceMgr.getInstantiationLoc(Tok.getLocation());
std::pair<unsigned, unsigned> LLocInfo =
SourceMgr.getDecomposedFileLoc(LLoc);
@@ -476,7 +476,7 @@ void html::HighlightMacros(Rewriter &R, unsigned FileID, Preprocessor& PP) {
// instantiation. It would be really nice to pop up a window with all the
// spelling of the tokens or something.
while (!Tok.is(tok::eof) &&
- SourceMgr.getLogicalLoc(Tok.getLocation()) == LLoc) {
+ SourceMgr.getInstantiationLoc(Tok.getLocation()) == LLoc) {
// Insert a newline if the macro expansion is getting large.
if (LineLen > 60) {
Expansion += "<br>";
OpenPOWER on IntegriCloud