rsmith added inline comments.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:1674-1675
@@ +1673,4 @@
+ if (lookupRepresentativeDecl(MangledName, OldGD) &&
+ (isa<CXXMethodDecl>(GD.getDecl()) ||
+ isa<CXXMethodDecl>(OldGD.getDecl())) &&
+ GD.getCanonicalDecl().getDecl() != OldGD.getCanonicalDecl().getDecl()) {
----------------
Why do you need this check? The same mangling collisions can happen with any
other kind of function declaration.
================
Comment at: lib/CodeGen/CodeGenModule.cpp:1681
@@ +1680,3 @@
+ diag::note_previous_definition);
+ return llvm::UndefValue::get(VoidPtrTy);
+ }
----------------
Any reason not to use an undef value of the appropriate type (`Ty`)? If you did
that, you presumably wouldn't need special cases elsewhere.
http://reviews.llvm.org/D11297
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits