riccibruno added inline comments.
================ Comment at: lib/Serialization/ASTWriter.cpp:4283 + // Sort to allow reproducible .pch files - https://bugs.debian.org/877359 + std::map<TypeID, std::set<std::string>> sortedOpenCLTypeExtMap; for (const auto &I : SemaRef.OpenCLTypeExtMap) { ---------------- lebedev.ri wrote: > Anastasia wrote: > > lebedev.ri wrote: > > > Would it be better to just change the actual type of > > > `SemaRef.OpenCLTypeExtMap`? > > > https://github.com/llvm-mirror/clang/blob/18917301298ad6df9e989983ed1e22cb0f9dff29/include/clang/Sema/Sema.h#L8710-L8712 > > What data structure would you suggest to use instead? I think sorting > > during serialization or de-serialization of AST isn't too bad because it's > > not a common use case. > Just `std::map<>`? Why is this a problem ? I thought that pch files where not supposed to be distributed. If we come to the conclusion that pch files must be reproducible, then I believe that this is by far not the only example. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60379/new/ https://reviews.llvm.org/D60379 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits