Add ODIN_LLVM_MINIMUM_VERSION_12

This commit is contained in:
gingerBill
2021-10-25 16:05:22 +01:00
parent 7ac156755b
commit 7d715fe113
3 changed files with 16 additions and 8 deletions
+1 -1
View File
@@ -2065,7 +2065,7 @@ LLVMAttributeRef lb_create_enum_attribute_with_type(LLVMContextRef ctx, char con
unsigned kind = 0;
String s = make_string_c(name);
#if (LLVM_VERSION_MAJOR > 12 || (LLVM_VERSION_MAJOR == 12 && (LLVM_VERSION_MINOR > 0 || LLVM_VERSION_PATCH >= 1)))
#if ODIN_LLVM_MINIMUM_VERSION_12
kind = LLVMGetEnumAttributeKindForName(name, s.len);
GB_ASSERT_MSG(kind != 0, "unknown attribute: %s", name);
return LLVMCreateTypeAttribute(ctx, kind, type);