From a6c10681e57c292e16a18bdb9891c8db6ebe5c83 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 26 Feb 2012 16:55:50 +0000 Subject: [PATCH] Move FullSourceLoc::dump into the .cpp file, the used attribute made us emit this into every TU that includes SourceLocation.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151493 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Basic/SourceLocation.h | 2 +- lib/Basic/SourceLocation.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index c4a64e3d53..d5fa7e74ac 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -325,7 +325,7 @@ public: /// Prints information about this FullSourceLoc to stderr. Useful for /// debugging. - LLVM_ATTRIBUTE_USED void dump() const { SourceLocation::dump(*SrcMgr); } + LLVM_ATTRIBUTE_USED void dump() const; friend inline bool operator==(const FullSourceLoc &LHS, const FullSourceLoc &RHS) { diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp index 6e4f3e6ad7..bb5a10a9c7 100644 --- a/lib/Basic/SourceLocation.cpp +++ b/lib/Basic/SourceLocation.cpp @@ -115,6 +115,10 @@ bool FullSourceLoc::isBeforeInTranslationUnitThan(SourceLocation Loc) const { return SrcMgr->isBeforeInTranslationUnit(*this, Loc); } +void FullSourceLoc::dump() const { + SourceLocation::dump(*SrcMgr); +} + const char *FullSourceLoc::getCharacterData(bool *Invalid) const { assert(isValid()); return SrcMgr->getCharacterData(*this, Invalid); -- 2.40.0