llvm: Use unreachable in targetTriple() for targets without LLVM support.
This commit is contained in:
@@ -81,12 +81,14 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
|
||||
.spirv => "spirv",
|
||||
.spirv32 => "spirv32",
|
||||
.spirv64 => "spirv64",
|
||||
.kalimba => "kalimba",
|
||||
.lanai => "lanai",
|
||||
.wasm32 => "wasm32",
|
||||
.wasm64 => "wasm64",
|
||||
.ve => "ve",
|
||||
.spu_2 => return error.@"LLVM backend does not support SPU Mark II",
|
||||
|
||||
.kalimba,
|
||||
.spu_2,
|
||||
=> unreachable, // Gated by hasLlvmSupport().
|
||||
};
|
||||
try llvm_triple.appendSlice(llvm_arch);
|
||||
try llvm_triple.appendSlice("-unknown-");
|
||||
|
||||
Reference in New Issue
Block a user