aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_const.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-08-09 21:13:52 +0100
committergingerBill <bill@gingerbill.org>2022-08-09 21:13:52 +0100
commit065526037876143c91dbbfaeb44666a474ff93c0 (patch)
tree02e05b8ff93039f8a515952b21789efcc4aa6e09 /src/llvm_backend_const.cpp
parentcfc372387923372c011ebaa97cd80461d68e2089 (diff)
Comment out a bit of code in `lb_is_const_or_global`
Diffstat (limited to 'src/llvm_backend_const.cpp')
-rw-r--r--src/llvm_backend_const.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/llvm_backend_const.cpp b/src/llvm_backend_const.cpp
index 8d910cf24..954778bb6 100644
--- a/src/llvm_backend_const.cpp
+++ b/src/llvm_backend_const.cpp
@@ -10,11 +10,12 @@ bool lb_is_const(lbValue value) {
return false;
}
-// TODO remove use of LLVMGetElementType
bool lb_is_const_or_global(lbValue value) {
if (lb_is_const(value)) {
return true;
}
+ // TODO remove use of LLVMGetElementType
+ #if 0
if (LLVMGetValueKind(value.value) == LLVMGlobalVariableValueKind) {
LLVMTypeRef t = LLVMGetElementType(LLVMTypeOf(value.value));
if (!lb_is_type_kind(t, LLVMPointerTypeKind)) {
@@ -23,6 +24,7 @@ bool lb_is_const_or_global(lbValue value) {
LLVMTypeRef elem = LLVMGetElementType(t);
return lb_is_type_kind(elem, LLVMFunctionTypeKind);
}
+ #endif
return false;
}