IR: Define MDNode uniquing sets automatically, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 4 Feb 2015 21:46:12 +0000 (21:46 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 4 Feb 2015 21:46:12 +0000 (21:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228200 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/LLVMContextImpl.h

index 8ed4e99646b386b784609049c1dae6c1683af7ae..facc6241f8d9908b690fe967013588e6e1dd8a9a 100644 (file)
@@ -357,9 +357,8 @@ public:
   DenseMap<Value *, ValueAsMetadata *> ValuesAsMetadata;
   DenseMap<Metadata *, MetadataAsValue *> MetadataAsValues;
 
-  DenseSet<MDTuple *, MDTupleInfo> MDTuples;
-  DenseSet<MDLocation *, MDLocationInfo> MDLocations;
-  DenseSet<GenericDebugNode *, GenericDebugNodeInfo> GenericDebugNodes;
+#define HANDLE_MDNODE_LEAF(CLASS) DenseSet<CLASS *, CLASS##Info> CLASS##s;
+#include "llvm/IR/Metadata.def"
 
   // MDNodes may be uniqued or not uniqued.  When they're not uniqued, they
   // aren't in the MDNodeSet, but they're still shared between objects, so no