vsapsai added a comment.

This problem shouldn't happen based on module-level name hashing but for some 
reason it is happening. If I'm not mistaken, InMemoryModuleCache uses .pcm file 
name as the key. But that file name should contain a hash part that is based on 
the modulemap path. But frameworks M in "frameworks" and "frameworks2" should 
have different paths for modulemaps and should have different .pcm names, 
therefore no conflicts in InMemoryModuleCache.

I see the value in not crashing but looks like there might be a problem 
somewhere else.

Also it is more of my personal pet peeve. InMemoryModuleCache should simplify 
memory management for modules but in practice it simplifies creating dangling 
references. I'm not asking to address that, so if you feel like my requests get 
too close to that direction, it's good to push back.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105328/new/

https://reviews.llvm.org/D105328

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

Reply via email to