mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
implement new helper method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aec6dd5bbc
commit
b370c7a41a
@ -997,6 +997,14 @@ Constant *ConstantStruct::get(const StructType *Ty,
|
||||
return ConstantAggregateZero::get(Ty);
|
||||
}
|
||||
|
||||
Constant *ConstantStruct::get(const std::vector<Constant*> &V) {
|
||||
std::vector<const Type*> StructEls;
|
||||
StructEls.reserve(V.size());
|
||||
for (unsigned i = 0, e = V.size(); i != e; ++i)
|
||||
StructEls.push_back(V[i]->getType());
|
||||
return get(StructType::get(StructEls), V);
|
||||
}
|
||||
|
||||
// destroyConstant - Remove the constant from the constant table...
|
||||
//
|
||||
void ConstantStruct::destroyConstant() {
|
||||
|
Loading…
Reference in New Issue
Block a user