Merge pull request #5396 from kumpera/fix_11696
[mono.git] / mono / mini / mini-llvm-cpp.cpp
index 4753f66ca6d882ec24a1110495a0ee5cbc5c5589..8ac2da6b60711132f7873655aa30e318bc9a18d9 100644 (file)
 
 using namespace llvm;
 
+#if LLVM_API_VERSION > 100
+// These are c++11 scoped enums in recent llvm versions
+#define Acquire AtomicOrdering::Acquire
+#define Release AtomicOrdering::Release
+#define SequentiallyConsistent AtomicOrdering::SequentiallyConsistent
+#endif
+
 void
 mono_llvm_dump_value (LLVMValueRef value)
 {
@@ -229,6 +236,14 @@ mono_llvm_set_call_preserveall_cc (LLVMValueRef func)
        unwrap<CallInst>(func)->setCallingConv (CallingConv::PreserveAll);
 }
 
+void
+mono_llvm_set_call_notail (LLVMValueRef func)
+{
+#if LLVM_API_VERSION > 100
+       unwrap<CallInst>(func)->setTailCallKind (CallInst::TailCallKind::TCK_NoTail);
+#endif
+}
+
 #if LLVM_API_VERSION > 100
 
 void*