mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Revamp the "ConstantStruct::get" methods. Previously, these were scattered
all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133412 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -612,9 +612,10 @@ LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str,
|
||||
LLVMValueRef LLVMConstStructInContext(LLVMContextRef C,
|
||||
LLVMValueRef *ConstantVals,
|
||||
unsigned Count, LLVMBool Packed) {
|
||||
return wrap(ConstantStruct::get(*unwrap(C),
|
||||
unwrap<Constant>(ConstantVals, Count),
|
||||
Count, Packed != 0));
|
||||
Constant **Elements = unwrap<Constant>(ConstantVals, Count);
|
||||
return wrap(ConstantStruct::getAnon(*unwrap(C),
|
||||
ArrayRef<Constant*>(Elements, Count),
|
||||
Packed != 0));
|
||||
}
|
||||
|
||||
LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
|
||||
|
Reference in New Issue
Block a user