mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
implement new helper method
llvm-svn: 14776
This commit is contained in:
parent
9fc90f37fd
commit
3f023d6df9
@ -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