[llvm-commits] [llvm-gcc-4.2] r46291 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Chris Lattner
clattner at apple.com
Wed Jan 23 17:25:15 PST 2008
On Jan 23, 2008, at 3:44 PM, Evan Cheng wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=46291&view=rev
> Log:
> Pointer's are also consider integer types. So %struct.datum = type
> { i8*, i32 } should not be passed by ByVal.
Ok, but please use !isa<PointerType>(STy) instead of using getTypeID
directly,
-Chris
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=46291&r1=46290&r2=46291&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Wed Jan 23
> 17:44:36 2008
> @@ -681,9 +681,11 @@
> /* Returns true if all elements of the type are integer types. */
> static bool llvm_x86_is_all_integer_types(const Type *Ty) {
> for (Type::subtype_iterator I = Ty->subtype_begin(), E = Ty-
> >subtype_end();
> - I != E; ++I)
> - if (!I->get()->isIntOrIntVector())
> + I != E; ++I) {
> + const Type *STy = I->get();
> + if (!STy->isIntOrIntVector() && STy->getTypeID() !=
> Type::PointerTyID)
> return false;
> + }
> return true;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list