Ping

================
Comment at: lib/AST/ItaniumMangle.cpp:3913-3925
@@ +3912,15 @@
+unsigned ItaniumMangleContextImpl::uniquifyNamedDecl(const NamedDecl *ND) {
+  IdentifierInfo *Identifier = ND->getIdentifier();
+  if (!Identifier) {
+    if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) {
+      if (const RecordType *RT = VD->getType()->getAs<RecordType>()) {
+        const RecordDecl *RD = RT->getDecl();
+        if (RD->isUnion()) {
+          if (const FieldDecl *FD = RD->findFirstNamedDataMember()) {
+            Identifier = FD->getIdentifier();
+          }
+        }
+      }
+    }
+  }
+  unsigned &Discriminator = Uniquifier[ND];
----------------
rsmith wrote:
> Why do you need to do this? Since this code is only reached for 
> non-externally-visible entities, a single counter for the context (like we 
> used to use) seems like it should be sufficient.
You are right. Reverted to the old code.

http://reviews.llvm.org/D6295



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to