[cfe-commits] r151493 - in /cfe/trunk: include/clang/Basic/SourceLocation.h lib/Basic/SourceLocation.cpp

Benjamin Kramer benny.kra at googlemail.com
Sun Feb 26 08:55:50 PST 2012


Author: d0k
Date: Sun Feb 26 10:55:50 2012
New Revision: 151493

URL: http://llvm.org/viewvc/llvm-project?rev=151493&view=rev
Log:
Move FullSourceLoc::dump into the .cpp file, the used attribute made us emit this into every TU that includes SourceLocation.h.

Modified:
    cfe/trunk/include/clang/Basic/SourceLocation.h
    cfe/trunk/lib/Basic/SourceLocation.cpp

Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=151493&r1=151492&r2=151493&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Sun Feb 26 10:55:50 2012
@@ -325,7 +325,7 @@
 
   /// 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) {

Modified: cfe/trunk/lib/Basic/SourceLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceLocation.cpp?rev=151493&r1=151492&r2=151493&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceLocation.cpp (original)
+++ cfe/trunk/lib/Basic/SourceLocation.cpp Sun Feb 26 10:55:50 2012
@@ -115,6 +115,10 @@
   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);





More information about the cfe-commits mailing list