1
Fork 0

Rename target triple to target tuple in many places in the compiler

This changes the naming to the new naming, used by `--print
target-tuple`.
It does not change all locations, but many.
This commit is contained in:
Noratrieb 2024-10-17 19:02:32 +02:00
parent 77d0b4ddfb
commit a26450cf81
32 changed files with 167 additions and 168 deletions

View file

@ -946,7 +946,7 @@ fn create_section_with_flags_asm(section_name: &str, section_flags: &str, data:
}
fn target_is_apple(cgcx: &CodegenContext<LlvmCodegenBackend>) -> bool {
let triple = cgcx.opts.target_triple.triple();
let triple = cgcx.opts.target_triple.tuple();
triple.contains("-ios")
|| triple.contains("-darwin")
|| triple.contains("-tvos")
@ -955,7 +955,7 @@ fn target_is_apple(cgcx: &CodegenContext<LlvmCodegenBackend>) -> bool {
}
fn target_is_aix(cgcx: &CodegenContext<LlvmCodegenBackend>) -> bool {
cgcx.opts.target_triple.triple().contains("-aix")
cgcx.opts.target_triple.tuple().contains("-aix")
}
pub(crate) fn bitcode_section_name(cgcx: &CodegenContext<LlvmCodegenBackend>) -> &'static CStr {
@ -1031,7 +1031,7 @@ unsafe fn embed_bitcode(
let is_aix = target_is_aix(cgcx);
let is_apple = target_is_apple(cgcx);
unsafe {
if is_apple || is_aix || cgcx.opts.target_triple.triple().starts_with("wasm") {
if is_apple || is_aix || cgcx.opts.target_triple.tuple().starts_with("wasm") {
// We don't need custom section flags, create LLVM globals.
let llconst = common::bytes_in_context(llcx, bitcode);
let llglobal = llvm::LLVMAddGlobal(