[llvm-commits] [llvm-gcc-4.2] r44958 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Devang Patel
dpatel at apple.com
Wed Dec 12 14:55:05 PST 2007
Author: dpatel
Date: Wed Dec 12 16:55:05 2007
New Revision: 44958
URL: http://llvm.org/viewvc/llvm-project?rev=44958&view=rev
Log:
set TREE_ASM_WRITTEN bit even if node is not processed due to previous errors.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=44958&r1=44957&r2=44958&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Wed Dec 12 16:55:05 2007
@@ -600,7 +600,10 @@
// emit_alias_to_llvm - Given decl and target emit alias to target.
void emit_alias_to_llvm(tree decl, tree target, tree target_decl) {
- if (errorcount || sorrycount) return;
+ if (errorcount || sorrycount) {
+ TREE_ASM_WRITTEN(decl) = 1;
+ return; // Do not process broken code.
+ }
timevar_push(TV_LLVM_GLOBALS);
@@ -769,7 +772,10 @@
/// LLVM as a global variable. This function implements the end of
/// assemble_variable.
void emit_global_to_llvm(tree decl) {
- if (errorcount || sorrycount) return;
+ if (errorcount || sorrycount) {
+ TREE_ASM_WRITTEN(decl) = 1;
+ return; // Do not process broken code.
+ }
// FIXME: Support alignment on globals: DECL_ALIGN.
// FIXME: DECL_PRESERVE_P indicates the var is marked with attribute 'used'.
More information about the llvm-commits
mailing list