[llvm-commits] [gcc-plugin] r80091 - /gcc-plugin/trunk/llvm-abi.h
Duncan Sands
baldrick at free.fr
Wed Aug 26 07:20:58 PDT 2009
Author: baldrick
Date: Wed Aug 26 09:20:58 2009
New Revision: 80091
URL: http://llvm.org/viewvc/llvm-project?rev=80091&view=rev
Log:
Make static routines declared in this header "static inline"
rather than just "static".
Modified:
gcc-plugin/trunk/llvm-abi.h
Modified: gcc-plugin/trunk/llvm-abi.h
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-abi.h?rev=80091&r1=80090&r2=80091&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-abi.h (original)
+++ gcc-plugin/trunk/llvm-abi.h Wed Aug 26 09:20:58 2009
@@ -117,7 +117,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;
@@ -133,7 +133,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)
@@ -153,8 +153,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;
@@ -202,7 +203,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)
@@ -213,7 +214,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;
@@ -238,7 +240,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;
}
@@ -358,9 +360,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