[llvm-commits] [dragonegg] r95301 - /dragonegg/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Thu Feb 4 01:48:19 PST 2010
Author: baldrick
Date: Thu Feb 4 03:48:19 2010
New Revision: 95301
URL: http://llvm.org/viewvc/llvm-project?rev=95301&view=rev
Log:
Get rid of the BOGUS_CTOR check - it doesn't seem to be needed
any more (though the GCC PR is still in state "new"...).
Modified:
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=95301&r1=95300&r2=95301&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Thu Feb 4 03:48:19 2010
@@ -97,13 +97,6 @@
print_gimple_stmt(stderr, stmt, 0, TDF_RAW);
}
-// Check for GCC bug 17347: C++ FE sometimes creates bogus ctor trees
-// which we should throw out
-#define BOGUS_CTOR(exp) \
- (DECL_INITIAL(exp) && \
- TREE_CODE(DECL_INITIAL(exp)) == CONSTRUCTOR && \
- !TREE_TYPE(DECL_INITIAL(exp)))
-
/// getINTEGER_CSTVal - Return the specified INTEGER_CST value as a uint64_t.
///
uint64_t getINTEGER_CSTVal(tree exp) {
@@ -5534,8 +5527,7 @@
// get this case right by forcing the initializer into memory.
if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) {
if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && !DECL_EXTERNAL(exp) &&
- GV->isDeclaration() &&
- !BOGUS_CTOR(exp)) {
+ GV->isDeclaration()) {
emit_global(exp);
Decl = DECL_LOCAL(exp); // Decl could have change if it changed type.
}
@@ -8519,8 +8511,7 @@
// get this case right by forcing the initializer into memory.
if (TREE_CODE(exp) == CONST_DECL || TREE_CODE(exp) == VAR_DECL) {
if ((DECL_INITIAL(exp) || !TREE_PUBLIC(exp)) && !DECL_EXTERNAL(exp) &&
- Val->isDeclaration() &&
- !BOGUS_CTOR(exp)) {
+ Val->isDeclaration()) {
emit_global(exp);
// Decl could have change if it changed type.
Val = cast<GlobalValue>(DECL_LLVM(exp));
More information about the llvm-commits
mailing list