[llvm-commits] [llvm-gcc-4.2] r80090 - /llvm-gcc-4.2/trunk/gcc/llvm-abi.h
Duncan Sands
baldrick at free.fr
Wed Aug 26 07:20:53 PDT 2009
Author: baldrick
Date: Wed Aug 26 09:20:53 2009
New Revision: 80090
URL: http://llvm.org/viewvc/llvm-project?rev=80090&view=rev
Log:
Make static routines declared in this header "static inline"
rather than just "static".
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=80090&r1=80089&r2=80090&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-abi.h (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-abi.h Wed Aug 26 09:20:53 2009
@@ -112,7 +112,7 @@
/// isAggregateTreeType - Return true if the specified GCC type is an aggregate
/// that cannot live in an LLVM register.
-static bool isAggregateTreeType(tree type) {
+static inline bool isAggregateTreeType(tree type) {
return TREE_CODE(type) == RECORD_TYPE || TREE_CODE(type) == ARRAY_TYPE ||
TREE_CODE(type) == UNION_TYPE || TREE_CODE(type) == QUAL_UNION_TYPE ||
TREE_CODE(type) == COMPLEX_TYPE;
@@ -128,7 +128,7 @@
// 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) {
+static inline bool doNotUseShadowReturn(tree type, tree fndecl) {
if (!TYPE_SIZE(type))
return false;
if (TREE_CODE(TYPE_SIZE(type)) != INTEGER_CST)
@@ -148,8 +148,9 @@
/// fields in addition to the single element that has data. If
/// rejectFatBitField, and the single element is a bitfield of a type that's
/// bigger than the struct, return null anyway.
-static tree isSingleElementStructOrArray(tree type, bool ignoreZeroLength,
- bool rejectFatBitfield) {
+static inline
+tree isSingleElementStructOrArray(tree type, bool ignoreZeroLength,
+ bool rejectFatBitfield) {
// Scalars are good.
if (!isAggregateTreeType(type)) return type;
@@ -197,7 +198,7 @@
/// isZeroSizedStructOrUnion - Returns true if this is a struct or union
/// which is zero bits wide.
-static bool isZeroSizedStructOrUnion(tree type) {
+static inline bool isZeroSizedStructOrUnion(tree type) {
if (TREE_CODE(type) != RECORD_TYPE &&
TREE_CODE(type) != UNION_TYPE &&
TREE_CODE(type) != QUAL_UNION_TYPE)
@@ -208,7 +209,8 @@
// getLLVMScalarTypeForStructReturn - Return LLVM Type if TY can be
// returned as a scalar, otherwise return NULL. This is the default
// target independent implementation.
-static const Type* getLLVMScalarTypeForStructReturn(tree type, unsigned *Offset) {
+static inline
+const Type* getLLVMScalarTypeForStructReturn(tree type, unsigned *Offset) {
const Type *Ty = ConvertType(type);
unsigned Size = getTargetData().getTypeAllocSize(Ty);
*Offset = 0;
@@ -233,7 +235,7 @@
// getLLVMAggregateTypeForStructReturn - Return LLVM type if TY can be
// returns as multiple values, otherwise return NULL. This is the default
// target independent implementation.
-static const Type* getLLVMAggregateTypeForStructReturn(tree type) {
+static inline const Type* getLLVMAggregateTypeForStructReturn(tree type) {
return NULL;
}
@@ -353,9 +355,10 @@
#define LLVM_EXTRACT_MULTIPLE_RETURN_VALUE(Src,Dest,V,B) \
llvm_default_extract_multiple_return_value((Src),(Dest),(V),(B))
#endif
-static void llvm_default_extract_multiple_return_value(Value *Src, Value *Dest,
- bool isVolatile,
- LLVMBuilder &Builder) {
+static inline
+void llvm_default_extract_multiple_return_value(Value *Src, Value *Dest,
+ bool isVolatile,
+ LLVMBuilder &Builder) {
assert (0 && "LLVM_EXTRACT_MULTIPLE_RETURN_VALUE is not implemented!");
}
More information about the llvm-commits
mailing list