================
@@ -115,6 +115,15 @@ struct ModuleID {
   }
 };
 
+struct ExtendedModuleID {
----------------
qiongsiwu wrote:

Oh I see what you meant. Thanks for the clarification. I agree using the STL as 
much as possible is a good idea. In our case here, I prefer the structure for 
the following reasons. 

1. There are a few use cases where we only use the `ID` field (e.g. 
[here](https://github.com/llvm/llvm-project/pull/137421/files#diff-6c14c5831345bba33e5cf69af62b76e8fea9d2d70474f6d9ccb024f99212c506R413)).
 It seems that `Info.first` is less readable than `Info.ID`.
2. I can add some documentation to the `struct`'s fields' names. I think I can 
do that with a pair as well, but it is less explicit. This is only a weak 
preference. 
3. It is easier to extend the `struct` if we need new fields. 

Does the above sound reasonable? If so I will keep what we have now. 

https://github.com/llvm/llvm-project/pull/137421
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to