Add the new union arthmetic instructions to llvm-c and ocaml.
[oota-llvm.git] / lib / VMCore / Core.cpp
index d383b3db8d4c9b3302ed252b3435da0c6189b567..747d696a3dfcefb91b66711538400abcafdcd547 100644 (file)
@@ -567,11 +567,13 @@ LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count,
   return LLVMConstStructInContext(LLVMGetGlobalContext(), ConstantVals, Count,
                                   Packed);
 }
-
 LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size) {
   return wrap(ConstantVector::get(
                             unwrap<Constant>(ScalarConstantVals, Size), Size));
 }
+LLVMValueRef LLVMConstUnion(LLVMTypeRef Ty, LLVMValueRef Val) {
+  return wrap(ConstantUnion::get(unwrap<UnionType>(Ty), unwrap<Constant>(Val)));
+}
 
 /*--.. Constant expressions ................................................--*/