teresajohnson wrote: > > I was mostly thinking that detecting and erroring at LTO time would result > > in a clearer error (like at the start of LTO::addModule, where it is > > looking for partially split LTO units, which we do by adding the module > > flag to the index flags). > > I don't think it would be detected at that point. The duplicate symbol error > would be detected by the linker when it adds the bitcode file to its symbol > table and likely cause it to error out before calling LTO::addModule which is > only called once the resolutions are known. So if we wanted a better error > message it would need to be added to each linker.
I didn't mean to catch the duplicate symbol, but rather to error if the flag was given but we have multiple LTO modules with the same source name, in which case we can give a specific error that this option was used when the source names were not in fact unique. I'll lgtm this patch, but something to consider as a follow on. https://github.com/llvm/llvm-project/pull/135728 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits