summaryrefslogtreecommitdiffstats
path: root/clang/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
commitc4eb7acde423870081630f4b94b068e3367f8a41 (patch)
tree98989dd8f5f26c8be0f2c634c1c87f0bc9653dbf /clang/lib/AST/DumpXML.cpp
parent7a1728094caf04c6d1567c5d100b1ec3f2c9aaaf (diff)
downloadbcm5719-llvm-c4eb7acde423870081630f4b94b068e3367f8a41.tar.gz
bcm5719-llvm-c4eb7acde423870081630f4b94b068e3367f8a41.zip
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
Diffstat (limited to 'clang/lib/AST/DumpXML.cpp')
-rw-r--r--clang/lib/AST/DumpXML.cpp4
1 files changed, 3 insertions, 1 deletions
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 <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: \
OpenPOWER on IntegriCloud