summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 05:51:33 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2010-02-28 05:51:33 +0000
commita8053dfd27e1164185c5054640101706e9f239b7 (patch)
tree398f0b30559328485e459e41b26e6a5ce3e1bd2c /llvm/lib/VMCore/Core.cpp
parent318317961c7e17505534168b6ea081c65ad68266 (diff)
downloadbcm5719-llvm-a8053dfd27e1164185c5054640101706e9f239b7.tar.gz
bcm5719-llvm-a8053dfd27e1164185c5054640101706e9f239b7.zip
Add the new union arthmetic instructions to llvm-c and ocaml.
llvm-svn: 97371
Diffstat (limited to 'llvm/lib/VMCore/Core.cpp')
-rw-r--r--llvm/lib/VMCore/Core.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp
index d383b3db8d4..747d696a3df 100644
--- a/llvm/lib/VMCore/Core.cpp
+++ b/llvm/lib/VMCore/Core.cpp
@@ -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 ................................................--*/
OpenPOWER on IntegriCloud