[clang] [clang][Dependency Scanning] Report What a Module Exports during Scanning (PR #137421)
Qiongsi Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 30 11:21:12 PDT 2025
================
@@ -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
More information about the cfe-commits
mailing list