[clang] Do not duplicate "EnableSplitLTOUnit" module flag
If clang's output is set to bitcode and LTO is enabled, clang would unconditionally add the flag to the module. Unfortunately, if the input were a bitcode or IR file and had the flag set, this would result in two copies of the flag, which is illegal IR. Guard the setting of the flag by checking whether it already exists. This follows existing practice for the related "ThinLTO" module flag. Differential Revision: https://reviews.llvm.org/D112177
Loading
Please sign in to comment