]> granicus.if.org Git - clang/commitdiff
Mark a few 'dump' methods as 'used' to make sure they are included in libclang
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Feb 2012 05:04:44 +0000 (05:04 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Feb 2012 05:04:44 +0000 (05:04 +0000)
and useable while debugging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151033 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclBase.h
include/clang/Basic/SourceLocation.h

index 961f49b871c01a1b841affcdb94e88f0540a430e..896b12f61e6d22cc335e469404c3aeeb0b0a576c 100644 (file)
@@ -848,8 +848,8 @@ public:
   static void printGroup(Decl** Begin, unsigned NumDecls,
                          raw_ostream &Out, const PrintingPolicy &Policy,
                          unsigned Indentation = 0);
-  void dump() const;
-  void dumpXML() const;
+  LLVM_ATTRIBUTE_USED void dump() const;
+  LLVM_ATTRIBUTE_USED void dumpXML() const;
   void dumpXML(raw_ostream &OS) const;
 
 private:
@@ -1490,7 +1490,7 @@ public:
   static bool classof(const NAME##Decl *D) { return true; }
 #include "clang/AST/DeclNodes.inc"
 
-  void dumpDeclContext() const;
+  LLVM_ATTRIBUTE_USED void dumpDeclContext() const;
 
 private:
   void LoadLexicalDeclsFromExternalStorage() const;
index 58546399145e47d53bce2d228c32c95d412eca8c..c4a64e3d534ef18960557e6393096fdc4f363ae3 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "clang/Basic/LLVM.h"
 #include "llvm/Support/PointerLikeTypeTraits.h"
+#include "llvm/Support/Compiler.h"
 #include <utility>
 #include <functional>
 #include <cassert>
@@ -324,7 +325,7 @@ public:
 
   /// Prints information about this FullSourceLoc to stderr. Useful for
   ///  debugging.
-  void dump() const { SourceLocation::dump(*SrcMgr); }
+  LLVM_ATTRIBUTE_USED void dump() const { SourceLocation::dump(*SrcMgr); }
 
   friend inline bool
   operator==(const FullSourceLoc &LHS, const FullSourceLoc &RHS) {