summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-02 18:03:10 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-02 18:03:10 +0000
commitcc841a3810acd2e8280ed3da4b0c2843b715cf3c (patch)
tree53276b7f2e61bc8ad9c983777652dc6172cfc635 /llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
parent639f2d92f85d0ad9a475edc5f3427c784f219b9b (diff)
downloadbcm5719-llvm-cc841a3810acd2e8280ed3da4b0c2843b715cf3c.tar.gz
bcm5719-llvm-cc841a3810acd2e8280ed3da4b0c2843b715cf3c.zip
To convert the StopPoint insn into an assembler directive by ISel, we need to have access to the line number field. So we convert that info as an operand by custom handling DBG_STOPPOINT in legalize.
llvm-svn: 68329
Diffstat (limited to 'llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
index 6a5c2e03718..b4950436ced 100644
--- a/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
+++ b/llvm/lib/Target/PIC16/PIC16AsmPrinter.cpp
@@ -21,6 +21,8 @@
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Mangler.h"
+#include "llvm/CodeGen/DwarfWriter.h"
+#include "llvm/CodeGen/MachineModuleInfo.h"
using namespace llvm;
@@ -187,6 +189,12 @@ bool PIC16AsmPrinter::doInitialization (Module &M) {
// The processor should be passed to llc as in input and the header file
// should be generated accordingly.
O << "\t#include P16F1937.INC\n";
+ MachineModuleInfo *MMI = getAnalysisIfAvailable<MachineModuleInfo>();
+ assert(MMI);
+ DwarfWriter *DW = getAnalysisIfAvailable<DwarfWriter>();
+ assert(DW && "Dwarf Writer is not available");
+ DW->BeginModule(&M, MMI, O, this, TAI);
+
EmitExternsAndGlobals (M);
EmitInitData (M);
EmitUnInitData(M);
OpenPOWER on IntegriCloud