As discussed in https://reviews.llvm.org/D60379 let's use std::map to store OpenCL extensions data structure.
Not sure how to test this though? I guess we can trust that std::map is always sorted just as it says in its description.
Differential D60778
Make precompiled headers reproducible by switching OpenCL extension to std::map riccibruno on Apr 16 2019, 8:50 AM. Authored by
Details
As discussed in https://reviews.llvm.org/D60379 let's use std::map to store OpenCL extensions data structure. Not sure how to test this though? I guess we can trust that std::map is always sorted just as it says in its description.
Diff Detail Event TimelineComment Actions
You could add a test that contains several entries in OpenCLTypeExtMap and several entries in OpenCLDeclExtMap. Comment Actions Ok I could do that, but I guess it can then fail on the commits that didn't actually trigger the issue. Would it not be a problem? Comment Actions Why would it fail if this fixes the issue? Comment Actions Mmm. I hope I am not missing something obvious, but how is this actually fixing the issue ? I don't see why the order between the Type * and between the Decl * should be deterministic (I think they will be when they are part of the same slab in the allocator, but I don't see why the slab ordering should be stable). Comment Actions Oh. Duh. Comment Actions But once something is changed and it's no longer deterministic, we might not be able to detect this necessarily on the offending commit with such test?
Comment Actions getDeclID is used in the first patch... although now I am thinking may be original patch is a better approach? |