summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MLKLLVMCompiler.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index 5428927..da4710d 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -57,8 +57,10 @@
#include <stddef.h>
#ifdef MACOSX
-#include <objc/runtime.h>
#include <objc/objc-api.h>
+#if defined(OBJC_API_VERSION) && OBJC_API_VERSION >= 2
+#include <objc/runtime.h>
+#endif
#endif
using namespace llvm;