@@ -235,7 +235,7 @@ static CodeModel::Model fromRust(LLVMRustCodeModel Model) {
235235 case LLVMRustCodeModel::Large:
236236 return CodeModel::Large;
237237 default :
238- llvm_unreachable (" Bad CodeModel." );
238+ report_fatal_error (" Bad CodeModel." );
239239 }
240240}
241241
@@ -258,7 +258,7 @@ static CodeGenOpt::Level fromRust(LLVMRustCodeGenOptLevel Level) {
258258 case LLVMRustCodeGenOptLevel::Aggressive:
259259 return CodeGenOpt::Aggressive;
260260 default :
261- llvm_unreachable (" Bad CodeGenOptLevel." );
261+ report_fatal_error (" Bad CodeGenOptLevel." );
262262 }
263263}
264264
@@ -302,7 +302,7 @@ static Optional<Reloc::Model> fromRust(LLVMRustRelocMode RustReloc) {
302302 break ;
303303#endif
304304 }
305- llvm_unreachable (" Bad RelocModel." );
305+ report_fatal_error (" Bad RelocModel." );
306306}
307307
308308#if LLVM_RUSTLLVM
@@ -511,7 +511,7 @@ static TargetMachine::CodeGenFileType fromRust(LLVMRustFileType Type) {
511511 case LLVMRustFileType::ObjectFile:
512512 return TargetMachine::CGFT_ObjectFile;
513513 default :
514- llvm_unreachable (" Bad FileType." );
514+ report_fatal_error (" Bad FileType." );
515515 }
516516}
517517
@@ -1197,7 +1197,7 @@ extern "C" bool
11971197LLVMRustWriteThinBitcodeToFile (LLVMPassManagerRef PMR,
11981198 LLVMModuleRef M,
11991199 const char *BcFile) {
1200- llvm_unreachable (" ThinLTO not available" );
1200+ report_fatal_error (" ThinLTO not available" );
12011201}
12021202
12031203struct LLVMRustThinLTOData {
@@ -1211,62 +1211,62 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
12111211 int num_modules,
12121212 const char **preserved_symbols,
12131213 int num_symbols) {
1214- llvm_unreachable (" ThinLTO not available" );
1214+ report_fatal_error (" ThinLTO not available" );
12151215}
12161216
12171217extern " C" bool
12181218LLVMRustPrepareThinLTORename (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1219- llvm_unreachable (" ThinLTO not available" );
1219+ report_fatal_error (" ThinLTO not available" );
12201220}
12211221
12221222extern " C" bool
12231223LLVMRustPrepareThinLTOResolveWeak (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1224- llvm_unreachable (" ThinLTO not available" );
1224+ report_fatal_error (" ThinLTO not available" );
12251225}
12261226
12271227extern " C" bool
12281228LLVMRustPrepareThinLTOInternalize (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1229- llvm_unreachable (" ThinLTO not available" );
1229+ report_fatal_error (" ThinLTO not available" );
12301230}
12311231
12321232extern " C" bool
12331233LLVMRustPrepareThinLTOImport (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1234- llvm_unreachable (" ThinLTO not available" );
1234+ report_fatal_error (" ThinLTO not available" );
12351235}
12361236
12371237extern " C" void
12381238LLVMRustFreeThinLTOData (LLVMRustThinLTOData *Data) {
1239- llvm_unreachable (" ThinLTO not available" );
1239+ report_fatal_error (" ThinLTO not available" );
12401240}
12411241
12421242struct LLVMRustThinLTOBuffer {
12431243};
12441244
12451245extern " C" LLVMRustThinLTOBuffer*
12461246LLVMRustThinLTOBufferCreate (LLVMModuleRef M) {
1247- llvm_unreachable (" ThinLTO not available" );
1247+ report_fatal_error (" ThinLTO not available" );
12481248}
12491249
12501250extern " C" void
12511251LLVMRustThinLTOBufferFree (LLVMRustThinLTOBuffer *Buffer) {
1252- llvm_unreachable (" ThinLTO not available" );
1252+ report_fatal_error (" ThinLTO not available" );
12531253}
12541254
12551255extern " C" const void *
12561256LLVMRustThinLTOBufferPtr (const LLVMRustThinLTOBuffer *Buffer) {
1257- llvm_unreachable (" ThinLTO not available" );
1257+ report_fatal_error (" ThinLTO not available" );
12581258}
12591259
12601260extern " C" size_t
12611261LLVMRustThinLTOBufferLen (const LLVMRustThinLTOBuffer *Buffer) {
1262- llvm_unreachable (" ThinLTO not available" );
1262+ report_fatal_error (" ThinLTO not available" );
12631263}
12641264
12651265extern " C" LLVMModuleRef
12661266LLVMRustParseBitcodeForThinLTO (LLVMContextRef Context,
12671267 const char *data,
12681268 size_t len,
12691269 const char *identifier) {
1270- llvm_unreachable (" ThinLTO not available" );
1270+ report_fatal_error (" ThinLTO not available" );
12711271}
12721272#endif // LLVM_VERSION_GE(4, 0)
0 commit comments