[PATCH] Fix codegen for virtual methods that are (re-) exported from multiple modules.

Manuel Klimek klimek at google.com
Tue Feb 24 00:58:18 PST 2015


In http://reviews.llvm.org/D7830#128657, @rsmith wrote:

> I'm curious how this was failing -- all four places you changed appear to be walking over the method declarations that are lexically within the class definitions, so they should all see the same set of declarations. Is there some other source of map keys that uses the canonical declaration instead? In any case, using the canonical declaration as the key seems like a good idea.


Most of the code already uses the canonical decls. When we create the OverridersMap / MethodInfoMap we apparently already use the canonical decl as key. The problem is that when we walk over the methods of a class owned by one module ('b' in this test), we might hit methods whose canonical decl is the method from the other module ('c' in this case).

> Is there any reason not to put all the module definitions in the same module map file in your test case? The `use` directives also seem redundant, since this isn't a test of `-fmodules-decluse`.


Done. Was just the way I was used to seeing module maps :)


http://reviews.llvm.org/D7830

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list