From 9d175c15e768d5ed4cb8fb1771621a299b87a94a Mon Sep 17 00:00:00 2001 From: Sanjiv Gupta Date: Mon, 11 May 2009 06:01:38 +0000 Subject: Detect calls to compiler intrinsics and emit an extern declarations only for those. These extern declarations to intrinsics are currently being emitted at the bottom of generated .s file, which works fine with gpasm(not sure about MPSAM though). PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any extern declarations (even if no intrinsics are being used), but that needs to be fixed in the linker itself. llvm-svn: 71423 --- llvm/lib/Target/PIC16/PIC16AsmPrinter.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Target/PIC16/PIC16AsmPrinter.h') diff --git a/llvm/lib/Target/PIC16/PIC16AsmPrinter.h b/llvm/lib/Target/PIC16/PIC16AsmPrinter.h index 13a269b5fa3..2bc8a57e717 100644 --- a/llvm/lib/Target/PIC16/PIC16AsmPrinter.h +++ b/llvm/lib/Target/PIC16/PIC16AsmPrinter.h @@ -21,6 +21,8 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetMachine.h" +#include +#include namespace llvm { struct VISIBILITY_HIDDEN PIC16AsmPrinter : public AsmPrinter { @@ -28,8 +30,6 @@ namespace llvm { const TargetAsmInfo *T, CodeGenOpt::Level OL, bool V) : AsmPrinter(O, TM, T, OL, V) { - FunctionLabelBegin = '@'; - IsRomData = false; PTLI = TM.getTargetLowering(); } private : @@ -46,6 +46,7 @@ namespace llvm { void EmitGlobalData (Module &M); void EmitRomData (Module &M); void emitFunctionData(MachineFunction &MF); + void printDecls(void); protected: bool doInitialization(Module &M); @@ -53,8 +54,7 @@ namespace llvm { private: PIC16TargetLowering *PTLI; - bool IsRomData; - char FunctionLabelBegin; + std::list Decls; // List of extern decls. }; } // end of namespace -- cgit v1.2.3