Now that we have everything nicely factored (e.g. asmprinter is not

doing global variable classification anymore) and hookized, sink almost
all target targets global variable emission code into AsmPrinter and out
of each target.

Some notes:

1. PIC16 does completely custom and crazy stuff, so it is not changed.
2. XCore has some custom handling for extra directives.  I'll look at it next.
3. This switches linux/ppc to use .globl instead of .global.  If .globl is
   actually wrong, let me know and I'll fix it.
4. This makes linux/ppc get a lot of random cases right which were obviously
   wrong before, it is probably now a bit healthier.
5. Blackfin will probably start getting .comm and other things that it didn't
   before.  If this is undesirable, it should explicitly opt out of these
   things by clearing the relevant fields of MCAsmInfo.

This leads to a nice diffstat:
 14 files changed, 127 insertions(+), 830 deletions(-)




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-01-19 05:38:33 +00:00
parent 074f837bbb
commit 74bfe21b50
15 changed files with 128 additions and 831 deletions

View File

@ -215,10 +215,6 @@ namespace llvm {
unsigned AsmVariant,
const char *ExtraCode);
/// PrintGlobalVariable - Emit the specified global variable and its
/// initializer to the output stream.
virtual void PrintGlobalVariable(const GlobalVariable *GV) = 0;
/// SetupMachineFunction - This should be called when a new MachineFunction
/// is being processed from runOnMachineFunction.
void SetupMachineFunction(MachineFunction &MF);
@ -241,7 +237,7 @@ namespace llvm {
void EmitJumpTableInfo(MachineJumpTableInfo *MJTI, MachineFunction &MF);
/// EmitGlobalVariable - Emit the specified global variable to the .s file.
void EmitGlobalVariable(const GlobalVariable *GV);
virtual void EmitGlobalVariable(const GlobalVariable *GV);
/// EmitSpecialLLVMGlobal - Check to see if the specified global is a
/// special global used by LLVM. If so, emit it and return true, otherwise