[PATCH] Fix Intrinsic::getType not working with llvm_vararg_ty
Hal Finkel
hfinkel at anl.gov
Fri Oct 17 23:45:05 PDT 2014
Hi Steven,
+ if (!ArgTys.empty() && ArgTys.back()->isVoidTy()) {
+ ArgTys.pop_back();
+ return FunctionType::get(ResultTy, ArgTys, true);
+ }
return FunctionType::get(ResultTy, ArgTys, false);
We should probably add some comment here that DecodeFixedType returns Void for IITDescriptor::Void and IITDescriptor::VarArg, but the former can only be a return type, so if we see a Void in the rest of the argument list, it must be from a IITDescriptor::VarArg. With an additional comment, LGTM.
-Hal
----- Original Message -----
> From: "Steven Wu" <stevenwu at apple.com>
> To: "llvm-commits" <llvm-commits at cs.uiuc.edu>
> Sent: Friday, October 17, 2014 8:14:08 PM
> Subject: [PATCH] Fix Intrinsic::getType not working with llvm_vararg_ty
>
>
>
> Hi
>
> This patch fixes the Intrinsic::getType function. Now it works with
> vararg. It is especially important since we now have 3 experimental
> vararg intrinsics.
>
> lib/IR/Function.cpp | 4 ++++
>
>
>
>
> Steven
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list