andreybokhanko added a comment.

In http://reviews.llvm.org/D15686#319725, @tra wrote:

> A better description of the problem would help. PR itself is somewhat short 
> on details.


Sorry for being not clear. I expected my main reviewer to be @rjmccall, who 
knows exactly what the problem is.

> If I understand it correctly, the problem is that if we create multiple 
> definitions with the same mangled name, clang does not always report it as an 
> error and only emits one of those instances.


Yes, exactly.

Patch updated; please re-review.

Yours,
Andrey


================
Comment at: lib/CodeGen/CodeGenModule.h:1140
@@ -1139,1 +1139,3 @@
+                                        const VarDecl *D,
+                                        bool IsForDefinition = false);
 
----------------
tra wrote:
> Ditto here.
Done (in *.cpp file).

================
Comment at: lib/CodeGen/CodeGenModule.h:1151
@@ -1148,3 +1150,3 @@
   void EmitGlobalFunctionDefinition(GlobalDecl GD, llvm::GlobalValue *GV);
-  void EmitGlobalVarDefinition(const VarDecl *D);
+  void EmitGlobalVarDefinition(const VarDecl *D, bool IsTentative = false);
   void EmitAliasDefinition(GlobalDecl GD);
----------------
tra wrote:
> And for IsTentative, too.
> 
Done (in*.cpp file).


http://reviews.llvm.org/D15686



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to