Browse Source

Comment out a bit of code in `lb_is_const_or_global`

gingerBill 3 years ago
parent
commit
0655260378
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/llvm_backend_const.cpp

+ 3 - 1
src/llvm_backend_const.cpp

@@ -10,11 +10,12 @@ bool lb_is_const(lbValue value) {
 	return false;
 	return false;
 }
 }
 
 
-// TODO remove use of LLVMGetElementType
 bool lb_is_const_or_global(lbValue value) {
 bool lb_is_const_or_global(lbValue value) {
 	if (lb_is_const(value)) {
 	if (lb_is_const(value)) {
 		return true;
 		return true;
 	}
 	}
+	// TODO remove use of LLVMGetElementType
+	#if 0
 	if (LLVMGetValueKind(value.value) == LLVMGlobalVariableValueKind) {
 	if (LLVMGetValueKind(value.value) == LLVMGlobalVariableValueKind) {
 		LLVMTypeRef t = LLVMGetElementType(LLVMTypeOf(value.value));
 		LLVMTypeRef t = LLVMGetElementType(LLVMTypeOf(value.value));
 		if (!lb_is_type_kind(t, LLVMPointerTypeKind)) {
 		if (!lb_is_type_kind(t, LLVMPointerTypeKind)) {
@@ -23,6 +24,7 @@ bool lb_is_const_or_global(lbValue value) {
 		LLVMTypeRef elem = LLVMGetElementType(t);
 		LLVMTypeRef elem = LLVMGetElementType(t);
 		return lb_is_type_kind(elem, LLVMFunctionTypeKind);
 		return lb_is_type_kind(elem, LLVMFunctionTypeKind);
 	}
 	}
+	#endif
 	return false;
 	return false;
 }
 }