aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2023-10-31 12:16:25 +0000
committerGitHub <noreply@github.com>2023-10-31 12:16:25 +0000
commiteb261f5b28a8d3cddc3dc21441f33775bb3ced95 (patch)
tree55014f5e1ffe0c099376699945a1800cc4d16246 /src/llvm_backend_const.cpp
parentbbd4c1054e18f18e934828b5160efce076027d1e (diff)
parentf5febb633c92ee1cf7b5d88f0146ffac3e2481b7 (diff)
Merge branch 'master' into new-sys-unix
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index a16b2293c..7584df3ee 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -94,6 +94,9 @@ gb_internal LLVMValueRef llvm_const_cast(LLVMValueRef val, LLVMTypeRef dst) {
LLVMTypeKind kind = LLVMGetTypeKind(dst);
switch (kind) {
case LLVMPointerTypeKind:
+ if (LB_USE_NEW_PASS_SYSTEM) {
+ return val;
+ }
return LLVMConstPointerCast(val, dst);
case LLVMStructTypeKind:
// GB_PANIC("%s -> %s", LLVMPrintValueToString(val), LLVMPrintTypeToString(dst));