[llvm-commits] CVS: llvm-gcc/gcc/llvm-expand.c
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 16 14:59:01 PST 2004
Changes in directory llvm-gcc/gcc:
llvm-expand.c updated: 1.27 -> 1.28
---
Log message:
Fix compile warning
Fix a regression in testcase C++Frontend/2004-01-11-DynamicInitializedConstant.cpp.tr
that was introduced when fixing CFrontend/2004-03-07-ExternalConstant.c.tr
---
Diffs of the changes: (+6 -3)
Index: llvm-gcc/gcc/llvm-expand.c
diff -u llvm-gcc/gcc/llvm-expand.c:1.27 llvm-gcc/gcc/llvm-expand.c:1.28
--- llvm-gcc/gcc/llvm-expand.c:1.27 Tue Mar 16 02:44:49 2004
+++ llvm-gcc/gcc/llvm-expand.c Tue Mar 16 14:58:43 2004
@@ -6752,8 +6752,8 @@
* block. If there were addresses of blocks taken, make it one of the block
* destinations. We know that the default edge can never be taken.
*/
- Switch->Operands[1] = Switch->x.Switch.Cases ?
- Switch->x.Switch.Cases->Dest : Fn->ExpandInfo->IndirectGotoBlock;
+ Switch->Operands[1] = D2V(Switch->x.Switch.Cases ?
+ Switch->x.Switch.Cases->Dest : Fn->ExpandInfo->IndirectGotoBlock);
}
if (Fn->ExpandInfo->RethrowBlock) {
@@ -6951,8 +6951,11 @@
G->Linkage = L_LinkOnce;
} else if (*/DECL_WEAK(decl) || DECL_COMMON(decl) || DECL_VIRTUAL_P(decl))
G->Linkage = L_Weak;
+
if (TREE_READONLY(decl) && !TREE_SIDE_EFFECTS(decl) &&
- (!DECL_INITIAL(decl) || TREE_CONSTANT(DECL_INITIAL(decl))))
+ DECL_EXTERNAL(decl) ||
+ (DECL_INITIAL(decl) != error_mark_node && /* no ctor? */
+ DECL_INITIAL(decl) && TREE_CONSTANT(DECL_INITIAL(decl))))
G->isConstant = 1;
/* Allociate the LLVM global with the tree global */
More information about the llvm-commits
mailing list