diff options
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 22d43a7d581..4c03288fe44 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -666,10 +666,8 @@ Constant *ConstantStruct::get(const StructType *ST, ArrayRef<Constant*> V) {    // Create a ConstantAggregateZero value if all elements are zeros.    for (unsigned i = 0, e = V.size(); i != e; ++i) -    if (!V[i]->isNullValue()) { -      // FIXME: Eliminate temporary std::vector here! -      return ST->getContext().pImpl->StructConstants.getOrCreate(ST, V.vec()); -    } +    if (!V[i]->isNullValue()) +      return ST->getContext().pImpl->StructConstants.getOrCreate(ST, V);    return ConstantAggregateZero::get(ST);  }  | 

