aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DumpXML.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-10-18 07:55:46 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-10-18 07:55:46 +0000
commit49c67c4099fc238b49a849553f2275eb43ea6675 (patch)
treea49c5dd0882e970ee6df180899d3a351a0415ce9 /lib/AST/DumpXML.cpp
parent1d9d9898ce2b338314161d92f39561a09a2a8b6f (diff)
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
Diffstat (limited to 'lib/AST/DumpXML.cpp')
-rw-r--r--lib/AST/DumpXML.cpp4
1 files changed, 3 insertions, 1 deletions
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 <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: \