For BC labels, emit empty data section instead of empty proc.
authorEdward Z. Yang <ezyang@mit.edu>
Wed, 13 Apr 2011 14:29:48 +0000 (15:29 +0100)
committerEdward Z. Yang <ezyang@mit.edu>
Wed, 13 Apr 2011 23:32:25 +0000 (00:32 +0100)
commitb1cf9aae4a495b619375da716d6d14f7cb494f8e
tree56d8bac97af31c0a55cc08bd886e94c5bb434352
parent1de43f7ca9e3790bb6450bb6860d5d14261470d9
For BC labels, emit empty data section instead of empty proc.

This fixes two bugs:

    - The new code generator doesn't like procedures with
      empty graphs, and panicked in labelAGraph.

    - LLVM optimizes away empty procedures but not empty
      data sections, so now the backwards-compatibility
      labels actually work with -fllvm.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
compiler/codeGen/CodeGen.lhs
compiler/codeGen/StgCmm.hs