Anastasia added a comment. Btw, just to be clear in my previous comment I was referring to the 2nd switch statement in CodeGenTypes::GetFunctionType that contains the line: ArgTypes[FirstIRArg] = LTy->getPointerTo(); http://reviews.llvm.org/D15603