diff --git a/compiler/generator/llvm/llvm_instructions.hh b/compiler/generator/llvm/llvm_instructions.hh
index 795c75e..8bbb29c 100644
--- a/compiler/generator/llvm/llvm_instructions.hh
+++ b/compiler/generator/llvm/llvm_instructions.hh
@@ -110,11 +110,14 @@ using namespace std;
 
 #define VECTOR_ALIGN 0
 
-#ifdef _WIN32
+#if __WIN32 && defined(LLVM_31)
     #define LLVM_MALLOC "llvm_malloc"
     #define LLVM_FREE   "llvm_free"
 #else
+    #if __WIN32 && (defined(LLVM_32) || defined(LLVM_33) || defined(LLVM_34) || defined(LLVM_35))
+        #warning "We don't know whether LLVM_MALLOC should be defined as llvm_malloc or malloc. Defining as malloc."
+    #endif
     #define LLVM_MALLOC "malloc"
     #define LLVM_FREE   "free"
 #endif
 
