[llvm-commits] [llvm-gcc-4.2] r49196 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h
Devang Patel
dpatel at apple.com
Thu Apr 3 18:15:59 PDT 2008
Author: dpatel
Date: Thu Apr 3 20:15:59 2008
New Revision: 49196
URL: http://llvm.org/viewvc/llvm-project?rev=49196&view=rev
Log:
Simplify.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-abi.h
Modified: llvm-gcc-4.2/trunk/gcc/llvm-abi.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-abi.h?rev=49196&r1=49195&r2=49196&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Thu Apr 3 20:15:59 2008
@@ -103,10 +103,14 @@
// doNotUseShadowReturn - Return true if the specified GCC type
// should not be returned using a pointer to struct parameter.
static bool doNotUseShadowReturn(tree type, tree fndecl) {
- if (TYPE_SIZE(type) && TREE_CODE(TYPE_SIZE(type)) == INTEGER_CST
- && !aggregate_value_p(type, fndecl))
- return true;
- return false;
+ if (!TYPE_SIZE(type))
+ return false;
+ if (TREE_CODE(TYPE_SIZE(type)) != INTEGER_CST)
+ return false;
+ // GCC says use shadow argument.
+ if (aggregate_value_p(type, fndecl))
+ return false;
+ return true;
}
/// isSingleElementStructOrArray - If this is (recursively) a structure with one
More information about the llvm-commits
mailing list