<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">1) If you don't modularize STL, then you just won't get any<br>
performance benefits when parsing the STL headers. Also some headers<br>
are sometimes incompatible with modules unless they're in their own<br>
[sub]module. E.g. you could have a header that is doing `class vector<br>
{ MEM_TYPE a; }` and in one inclusion context we have `#define<br>
MEM_TYPE long` and in another `#define MEM_TYPE unsigned`. This breaks<br>
ODR checking but usually is prevented by modularizing the header that<br>
contains `vector`.<br></blockquote><div><br></div><div>1) Yes, I understand that clang would still need to parse STL headers for each TU unless they are coming from modules. Apparently when I try to use modules on STL it fails with the similar ODR error but now on glibc and kernel headers and then exposes a lot more errors on our codebase itself. I would like transition to modules to be more incremental. It's fine to be initially without performance benefits.</div><div>But if it's indeed incompatibility like you mentioned then it doesn't seem to be the other way.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2) It's probably not a regression, but IIRC this ODR check that<br>
recognizes the issue was introduced between those two revisions.<br>
Either it's a code issue like in my example above or it's a bug in<br>
this check. Try filing a bug report and you can usually workaround for<br>
now by modularizing those headers.<br></blockquote><div><br></div><div>Just to confirm my understanding: if vector definitions are exactly the same (even coming from different modules) then this ODR check shouldn't be triggering, right? </div><div>I'll double check what's happening and file a bug if that's the issue with the check.<br></div><div><br></div><div>Thanks for the pointers to filesystem overlays! I wasn't aware of such mechanism.</div><div> </div><div><br></div><div>-- </div><div>Dmitry</div></div></div></div>