diff options
| author | Laytan <laytanlaats@hotmail.com> | 2024-08-31 19:40:05 +0200 |
|---|---|---|
| committer | Laytan <laytanlaats@hotmail.com> | 2024-08-31 19:40:05 +0200 |
| commit | 722b638e2cbefcc1735256ef712cf2b28078a7fb (patch) | |
| tree | 5c2446c5c15b72b401ebd3194a887c569c3a9795 /src | |
| parent | c1cb1a3d7e546bcb73a012eda04521d1adbb6366 (diff) | |
"fix" #4169, looks like llvm 14 bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/llvm_backend_stmt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/llvm_backend_stmt.cpp b/src/llvm_backend_stmt.cpp index bef516283..df3d4bc03 100644 --- a/src/llvm_backend_stmt.cpp +++ b/src/llvm_backend_stmt.cpp @@ -2199,8 +2199,7 @@ gb_internal void lb_build_if_stmt(lbProcedure *p, Ast *node) { // and `LLVMConstIntGetZExtValue()` calls below will be valid and `LLVMInstructionEraseFromParent()` // will target the correct (& only) branch statement - - if (cond.value && LLVMIsConstant(cond.value)) { + if (cond.value && LLVMIsAConstantInt(cond.value)) { // NOTE(bill): Do a compile time short circuit for when the condition is constantly known. // This done manually rather than relying on the SSA passes because sometimes the SSA passes // miss some even if they are constantly known, especially with few optimization passes. |