]> granicus.if.org Git - clang/commitdiff
Put used="1" on all used declarations in the XML dumper. This allows us to
authorNick Lewycky <nicholas@mxc.ca>
Thu, 18 Oct 2012 07:55:46 +0000 (07:55 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 18 Oct 2012 07:55:46 +0000 (07:55 +0000)
start seeing the bit so that we can find bugs and write tests for it.

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

lib/AST/DumpXML.cpp

index 700769d0216d8557189afbbc0fc3df6ffae018be..81745c614c2b3f7369e6d64b5040d8b90e9a04e9 100644 (file)
@@ -1,4 +1,4 @@
-//===--- DumpXML.cpp - Detailed XML dumping ---------------------*- C++ -*-===//
+//===--- DumpXML.cpp - Detailed XML dumping -------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -64,6 +64,8 @@ template <class Impl> struct XMLDeclVisitor {
   static_cast<Impl*>(this)->NAME(static_cast<CLASS*>(D))
 
   void dispatch(Decl *D) {
+    if (D->isUsed())
+      static_cast<Impl*>(this)->set("used", "1");
     switch (D->getKind()) {
 #define DECL(DERIVED, BASE) \
       case Decl::DERIVED: \