aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-26 20:15:46 +0000
committerChris Lattner <sabre@nondot.org>2009-01-26 20:15:46 +0000
commit071831dcc7fb502d8957535366baa6ac7f72e70d (patch)
treefd7d1b97a88241b71075d27c8a34a9b05e525511 /lib/Lex/Lexer.cpp
parent3c125576d971dfd4d81be93813a8896f302d992b (diff)
allow _Pragmas formed from #defines to keep their full instantiation
history git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63035 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r--lib/Lex/Lexer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 03d81b3b9a..7f14e7a4a2 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -321,10 +321,9 @@ static SourceLocation GetMappedTokenLoc(Preprocessor &PP,
// Create a new SLoc which is expanded from Instantiation(FileLoc) but whose
// characters come from spelling(FileLoc)+Offset.
- SourceLocation InstLoc = SourceMgr.getInstantiationLoc(FileLoc);
SourceLocation SpellingLoc = SourceMgr.getSpellingLoc(FileLoc);
SpellingLoc = SpellingLoc.getFileLocWithOffset(CharNo);
- return SourceMgr.createInstantiationLoc(SpellingLoc, InstLoc, TokLen);
+ return SourceMgr.createInstantiationLoc(SpellingLoc, FileLoc, TokLen);
}
/// getSourceLocation - Return a source location identifier for the specified