diff options
author | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-02-28 05:51:33 +0000 |
---|---|---|
committer | Erick Tryzelaar <idadesub@users.sourceforge.net> | 2010-02-28 05:51:33 +0000 |
commit | a8053dfd27e1164185c5054640101706e9f239b7 (patch) | |
tree | 398f0b30559328485e459e41b26e6a5ce3e1bd2c /llvm/lib/VMCore/Core.cpp | |
parent | 318317961c7e17505534168b6ea081c65ad68266 (diff) | |
download | bcm5719-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.cpp | 4 |
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 ................................................--*/ |