[CodeGen] Don't dereference vector::end if the vector can be empty

MSVC complains about this in debug mode. NFC.

llvm-svn: 242622
This commit is contained in:
Benjamin Kramer 2015-07-18 20:30:11 +00:00
parent 59764dccfb
commit a1e0aa5020

View File

@ -3803,7 +3803,7 @@ MicrosoftCXXABI::getAddrOfCXXCtorClosure(const CXXConstructorDecl *CD,
CodeGenFunction::RunCleanupsScope Cleanups(CGF);
const auto *FPT = CD->getType()->castAs<FunctionProtoType>();
CGF.EmitCallArgs(Args, FPT, &*ArgVec.begin(), &*ArgVec.end(), CD,
CGF.EmitCallArgs(Args, FPT, ArgVec.data(), ArgVec.data() + ArgVec.size(), CD,
IsCopy ? 1 : 0);
// Insert any ABI-specific implicit constructor arguments.