llvm-svn: 189473
This commit is contained in:
Alexey Samsonov 2013-08-28 11:25:12 +00:00
parent 9a5ed9c3bd
commit 9b7e2b555c
1 changed files with 4 additions and 3 deletions

View File

@ -307,10 +307,11 @@ FunctionType *DataFlowSanitizer::getTrampolineFunctionType(FunctionType *T) {
FunctionType *DataFlowSanitizer::getCustomFunctionType(FunctionType *T) {
assert(!T->isVarArg());
llvm::SmallVector<Type *, 4> ArgTypes;
for (FunctionType::param_iterator i = T->param_begin(), e = T->param_end(); i != e; ++i) {
for (FunctionType::param_iterator i = T->param_begin(), e = T->param_end();
i != e; ++i) {
FunctionType *FT;
if (isa<PointerType>(*i) &&
(FT = dyn_cast<FunctionType>(cast<PointerType>(*i)->getElementType()))) {
if (isa<PointerType>(*i) && (FT = dyn_cast<FunctionType>(cast<PointerType>(
*i)->getElementType()))) {
ArgTypes.push_back(getTrampolineFunctionType(FT)->getPointerTo());
ArgTypes.push_back(Type::getInt8PtrTy(*Ctx));
} else {