[FunctionImport] Change IRMover report_fatal_error to a proper error
authorFangrui Song <i@maskray.me>
Fri, 24 Feb 2023 05:45:14 +0000 (21:45 -0800)
committerFangrui Song <i@maskray.me>
Fri, 24 Feb 2023 05:45:14 +0000 (21:45 -0800)
commitf53de29862193b761f3ef8ec0627d1e70d2fe674
tree74cfe6eb937b7c677f03fd85b20a553e737dfea5
parent6860d1c6e44f3e0a0d182f58b3848f720b5ade59
[FunctionImport] Change IRMover report_fatal_error to a proper error

Conflicting module flags leads to a proper error for regular LTO but a crash
(report_fatal_error) for ThinLTO. Switch to createStringError to fix the crash
and match regular LTO.
llvm/lib/Transforms/IPO/FunctionImport.cpp
llvm/test/Transforms/FunctionImport/module-flags.ll [new file with mode: 0644]