From c4eb7acde423870081630f4b94b068e3367f8a41 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 18 Oct 2012 07:55:46 +0000 Subject: 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. llvm-svn: 166171 --- clang/lib/AST/DumpXML.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/AST/DumpXML.cpp') diff --git a/clang/lib/AST/DumpXML.cpp b/clang/lib/AST/DumpXML.cpp index 700769d0216..81745c614c2 100644 --- a/clang/lib/AST/DumpXML.cpp +++ b/clang/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: \ -- cgit v1.2.3