[llvm-commits] [llvm-gcc] Patch needed?
Reid Spencer
rspencer at reidspencer.com
Sun Feb 18 00:03:57 PST 2007
Hi,
I found a situation where the following patch is needed. Building
llvm-gcc head (with cummulative patch) fails with SEGV while compiling
the libstdc++. This patch is a bandaid and I don't know if its the
correct thing or not as TYPE_SIZE(Type) should probably not be null, but
it is.
You can probably replicate this by doing a clean llvm-gcc build
including the latest patches.
Reid.
Index: llvm-types.cpp
===================================================================
--- llvm-types.cpp (revision 276)
+++ llvm-types.cpp (working copy)
@@ -58,7 +58,7 @@
// refined and replaced by another LLVM Type. This is achieved by
maintaining
// a map.
-// Collection of LLVM Types and their names
+// Collection of LLVM Types
static std::vector<const Type *> LTypes;
typedef DenseMap<const Type *, unsigned> LTypesMapTy;
static LTypesMapTy LTypesMap;
@@ -212,7 +212,8 @@
bool isPassedByInvisibleReference(tree Type) {
// FIXME: Search for TREE_ADDRESSABLE in calls.c, and see if there
are other
// cases that make arguments automatically passed in by reference.
- return TREE_ADDRESSABLE(Type);
+ return TREE_ADDRESSABLE(Type) ||
+ (TYPE_SIZE(Type) && TREE_CODE(TYPE_SIZE(Type)) !=
INTEGER_CST);
}
/// GetTypeName - Return a fully qualified (with namespace prefixes)
name for
More information about the llvm-commits
mailing list