diff options
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/ConstantFolding.cpp | 10 | ||||
-rw-r--r-- | lib/Analysis/DebugInfo.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp index 00b5441..e5ab322 100644 --- a/lib/Analysis/ConstantFolding.cpp +++ b/lib/Analysis/ConstantFolding.cpp @@ -260,7 +260,7 @@ static Constant *FoldBitCast(Constant *C, const Type *DestTy, } } - return ConstantVector::get(&Result[0], Result.size()); + return ConstantVector::get(Result.data(), Result.size()); } } @@ -306,10 +306,10 @@ Constant *llvm::ConstantFoldInstruction(Instruction *I, const TargetData *TD) { if (const CmpInst *CI = dyn_cast<CmpInst>(I)) return ConstantFoldCompareInstOperands(CI->getPredicate(), - &Ops[0], Ops.size(), TD); + Ops.data(), Ops.size(), TD); else return ConstantFoldInstOperands(I->getOpcode(), I->getType(), - &Ops[0], Ops.size(), TD); + Ops.data(), Ops.size(), TD); } /// ConstantFoldConstantExpression - Attempt to fold the constant expression @@ -325,10 +325,10 @@ Constant *llvm::ConstantFoldConstantExpression(ConstantExpr *CE, if (CE->isCompare()) return ConstantFoldCompareInstOperands(CE->getPredicate(), - &Ops[0], Ops.size(), TD); + Ops.data(), Ops.size(), TD); else return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), - &Ops[0], Ops.size(), TD); + Ops.data(), Ops.size(), TD); } /// ConstantFoldInstOperands - Attempt to constant fold an instruction with the diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 9f6cbc9..6bdb64c 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -442,7 +442,7 @@ DIArray DIFactory::GetOrCreateArray(DIDescriptor *Tys, unsigned NumTys) { Constant *Init = ConstantArray::get(ArrayType::get(EmptyStructPtr, Elts.size()), - &Elts[0], Elts.size()); + Elts.data(), Elts.size()); // If we already have this array, just return the uniqued version. DIDescriptor &Entry = SimpleConstantCache[Init]; if (!Entry.isNull()) return DIArray(Entry.getGV()); |