From: Nick Lewycky Date: Thu, 18 Oct 2012 07:55:46 +0000 (+0000) Subject: Put used="1" on all used declarations in the XML dumper. This allows us to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49c67c4099fc238b49a849553f2275eb43ea6675;p=clang Put used="1" on all used declarations in the XML dumper. This allows us to 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 --- diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp index 700769d021..81745c614c 100644 --- a/lib/AST/DumpXML.cpp +++ b/lib/AST/DumpXML.cpp @@ -1,4 +1,4 @@ -//===--- DumpXML.cpp - Detailed XML dumping ---------------------*- C++ -*-===// +//===--- DumpXML.cpp - Detailed XML dumping -------------------------------===// // // The LLVM Compiler Infrastructure // @@ -64,6 +64,8 @@ template struct XMLDeclVisitor { static_cast(this)->NAME(static_cast(D)) void dispatch(Decl *D) { + if (D->isUsed()) + static_cast(this)->set("used", "1"); switch (D->getKind()) { #define DECL(DERIVED, BASE) \ case Decl::DERIVED: \