summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16AsmPrinter.h
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-05-11 06:01:38 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-05-11 06:01:38 +0000
commit9d175c15e768d5ed4cb8fb1771621a299b87a94a (patch)
treeaa2faddc22f06e3b3f43432128b886fa8672c11b /llvm/lib/Target/PIC16/PIC16AsmPrinter.h
parentaeec9d53cedcd096911042a902e0f70a5bb403ad (diff)
downloadbcm5719-llvm-9d175c15e768d5ed4cb8fb1771621a299b87a94a.tar.gz
bcm5719-llvm-9d175c15e768d5ed4cb8fb1771621a299b87a94a.zip
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
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16AsmPrinter.h')
-rw-r--r--llvm/lib/Target/PIC16/PIC16AsmPrinter.h8
1 files changed, 4 insertions, 4 deletions
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 <list>
+#include <string>
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<const char *> Decls; // List of extern decls.
};
} // end of namespace
OpenPOWER on IntegriCloud