Auto merge of #83387 - cuviper:min-llvm-10, r=nagisa

Update the minimum external LLVM to 10

r? `@nikic`
This commit is contained in:
bors 2021-03-25 13:11:18 +00:00
commit 6e17a5c5fd
16 changed files with 19 additions and 137 deletions

View file

@ -101,10 +101,6 @@ fn to_llvm_tls_model(tls_model: TlsModel) -> llvm::ThreadLocalMode {
}
}
fn strip_x86_address_spaces(data_layout: String) -> String {
data_layout.replace("-p270:32:32-p271:32:32-p272:64:64-", "-")
}
fn strip_powerpc64_vectors(data_layout: String) -> String {
data_layout.replace("-v256:256:256-v512:512:512", "")
}
@ -119,11 +115,6 @@ pub unsafe fn create_module(
let llmod = llvm::LLVMModuleCreateWithNameInContext(mod_name.as_ptr(), llcx);
let mut target_data_layout = sess.target.data_layout.clone();
if llvm_util::get_version() < (10, 0, 0)
&& (sess.target.arch == "x86" || sess.target.arch == "x86_64")
{
target_data_layout = strip_x86_address_spaces(target_data_layout);
}
if llvm_util::get_version() < (12, 0, 0) && sess.target.arch == "powerpc64" {
target_data_layout = strip_powerpc64_vectors(target_data_layout);
}