diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-02 18:03:10 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-04-02 18:03:10 +0000 |
commit | 5274a4afb720858bf1ab927fc90068f1a8f12eb2 (patch) | |
tree | fd4e2cee00ab00010e402e7b2b4c39335b9aca49 /lib/Target/PIC16/PIC16AsmPrinter.cpp | |
parent | b84d5a476a8e678dbdeef848b22ea22c24632e11 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68329 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16AsmPrinter.cpp')
-rw-r--r-- | lib/Target/PIC16/PIC16AsmPrinter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/PIC16/PIC16AsmPrinter.cpp b/lib/Target/PIC16/PIC16AsmPrinter.cpp index 6a5c2e0371..b4950436ce 100644 --- a/lib/Target/PIC16/PIC16AsmPrinter.cpp +++ b/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); |