aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index e6bf1777a8..48fdd68ab9 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -142,17 +142,7 @@ void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const {
}
void Preprocessor::DumpLocation(SourceLocation Loc) const {
- SourceLocation LogLoc = SourceMgr.getInstantiationLoc(Loc);
- llvm::cerr << SourceMgr.getSourceName(LogLoc) << ':'
- << SourceMgr.getLineNumber(LogLoc) << ':'
- << SourceMgr.getColumnNumber(LogLoc);
-
- SourceLocation SpellingLoc = SourceMgr.getSpellingLoc(Loc);
- if (SpellingLoc != LogLoc) {
- llvm::cerr << " <SpellingLoc=";
- DumpLocation(SpellingLoc);
- llvm::cerr << ">";
- }
+ Loc.dump(SourceMgr);
}
void Preprocessor::DumpMacro(const MacroInfo &MI) const {