@@ -235,7 +235,7 @@ static CodeModel::Model fromRust(LLVMRustCodeModel Model) {
235
235
case LLVMRustCodeModel::Large:
236
236
return CodeModel::Large;
237
237
default :
238
- llvm_unreachable (" Bad CodeModel." );
238
+ report_fatal_error (" Bad CodeModel." );
239
239
}
240
240
}
241
241
@@ -258,7 +258,7 @@ static CodeGenOpt::Level fromRust(LLVMRustCodeGenOptLevel Level) {
258
258
case LLVMRustCodeGenOptLevel::Aggressive:
259
259
return CodeGenOpt::Aggressive;
260
260
default :
261
- llvm_unreachable (" Bad CodeGenOptLevel." );
261
+ report_fatal_error (" Bad CodeGenOptLevel." );
262
262
}
263
263
}
264
264
@@ -302,7 +302,7 @@ static Optional<Reloc::Model> fromRust(LLVMRustRelocMode RustReloc) {
302
302
break ;
303
303
#endif
304
304
}
305
- llvm_unreachable (" Bad RelocModel." );
305
+ report_fatal_error (" Bad RelocModel." );
306
306
}
307
307
308
308
#if LLVM_RUSTLLVM
@@ -511,7 +511,7 @@ static TargetMachine::CodeGenFileType fromRust(LLVMRustFileType Type) {
511
511
case LLVMRustFileType::ObjectFile:
512
512
return TargetMachine::CGFT_ObjectFile;
513
513
default :
514
- llvm_unreachable (" Bad FileType." );
514
+ report_fatal_error (" Bad FileType." );
515
515
}
516
516
}
517
517
@@ -1197,7 +1197,7 @@ extern "C" bool
1197
1197
LLVMRustWriteThinBitcodeToFile (LLVMPassManagerRef PMR,
1198
1198
LLVMModuleRef M,
1199
1199
const char *BcFile) {
1200
- llvm_unreachable (" ThinLTO not available" );
1200
+ report_fatal_error (" ThinLTO not available" );
1201
1201
}
1202
1202
1203
1203
struct LLVMRustThinLTOData {
@@ -1211,62 +1211,62 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
1211
1211
int num_modules,
1212
1212
const char **preserved_symbols,
1213
1213
int num_symbols) {
1214
- llvm_unreachable (" ThinLTO not available" );
1214
+ report_fatal_error (" ThinLTO not available" );
1215
1215
}
1216
1216
1217
1217
extern " C" bool
1218
1218
LLVMRustPrepareThinLTORename (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1219
- llvm_unreachable (" ThinLTO not available" );
1219
+ report_fatal_error (" ThinLTO not available" );
1220
1220
}
1221
1221
1222
1222
extern " C" bool
1223
1223
LLVMRustPrepareThinLTOResolveWeak (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1224
- llvm_unreachable (" ThinLTO not available" );
1224
+ report_fatal_error (" ThinLTO not available" );
1225
1225
}
1226
1226
1227
1227
extern " C" bool
1228
1228
LLVMRustPrepareThinLTOInternalize (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1229
- llvm_unreachable (" ThinLTO not available" );
1229
+ report_fatal_error (" ThinLTO not available" );
1230
1230
}
1231
1231
1232
1232
extern " C" bool
1233
1233
LLVMRustPrepareThinLTOImport (const LLVMRustThinLTOData *Data, LLVMModuleRef M) {
1234
- llvm_unreachable (" ThinLTO not available" );
1234
+ report_fatal_error (" ThinLTO not available" );
1235
1235
}
1236
1236
1237
1237
extern " C" void
1238
1238
LLVMRustFreeThinLTOData (LLVMRustThinLTOData *Data) {
1239
- llvm_unreachable (" ThinLTO not available" );
1239
+ report_fatal_error (" ThinLTO not available" );
1240
1240
}
1241
1241
1242
1242
struct LLVMRustThinLTOBuffer {
1243
1243
};
1244
1244
1245
1245
extern " C" LLVMRustThinLTOBuffer*
1246
1246
LLVMRustThinLTOBufferCreate (LLVMModuleRef M) {
1247
- llvm_unreachable (" ThinLTO not available" );
1247
+ report_fatal_error (" ThinLTO not available" );
1248
1248
}
1249
1249
1250
1250
extern " C" void
1251
1251
LLVMRustThinLTOBufferFree (LLVMRustThinLTOBuffer *Buffer) {
1252
- llvm_unreachable (" ThinLTO not available" );
1252
+ report_fatal_error (" ThinLTO not available" );
1253
1253
}
1254
1254
1255
1255
extern " C" const void *
1256
1256
LLVMRustThinLTOBufferPtr (const LLVMRustThinLTOBuffer *Buffer) {
1257
- llvm_unreachable (" ThinLTO not available" );
1257
+ report_fatal_error (" ThinLTO not available" );
1258
1258
}
1259
1259
1260
1260
extern " C" size_t
1261
1261
LLVMRustThinLTOBufferLen (const LLVMRustThinLTOBuffer *Buffer) {
1262
- llvm_unreachable (" ThinLTO not available" );
1262
+ report_fatal_error (" ThinLTO not available" );
1263
1263
}
1264
1264
1265
1265
extern " C" LLVMModuleRef
1266
1266
LLVMRustParseBitcodeForThinLTO (LLVMContextRef Context,
1267
1267
const char *data,
1268
1268
size_t len,
1269
1269
const char *identifier) {
1270
- llvm_unreachable (" ThinLTO not available" );
1270
+ report_fatal_error (" ThinLTO not available" );
1271
1271
}
1272
1272
#endif // LLVM_VERSION_GE(4, 0)
0 commit comments