aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-07-09 21:20:54 +0000
committerDale Johannesen <dalej@apple.com>2008-07-09 21:20:54 +0000
commitf2452c5f48e13cf3a9e620d22d5040a90133ddca (patch)
tree5860e88541a05423dee90a021003918001f461a7 /lib/Target/ARM/ARMAsmPrinter.cpp
parentdd4b47c9b27eec402b56b27159c4323dd9aa5e94 (diff)
downloadexternal_llvm-f2452c5f48e13cf3a9e620d22d5040a90133ddca.zip
external_llvm-f2452c5f48e13cf3a9e620d22d5040a90133ddca.tar.gz
external_llvm-f2452c5f48e13cf3a9e620d22d5040a90133ddca.tar.bz2
Emit debug info for data-only files. ARM version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index 23e5e37..b853a84 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -42,11 +42,13 @@ STATISTIC(EmittedInsts, "Number of machine instrs printed");
namespace {
struct VISIBILITY_HIDDEN ARMAsmPrinter : public AsmPrinter {
ARMAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
- : AsmPrinter(O, TM, T), DW(O, this, T), AFI(NULL), InCPMode(false) {
+ : AsmPrinter(O, TM, T), DW(O, this, T), MMI(NULL), AFI(NULL),
+ InCPMode(false) {
Subtarget = &TM.getSubtarget<ARMSubtarget>();
}
DwarfWriter DW;
+ MachineModuleInfo *MMI;
/// Subtarget - Keep a pointer to the ARMSubtarget around so that we can
/// make the right decision when printing asm code for different targets.
@@ -176,8 +178,6 @@ FunctionPass *llvm::createARMCodePrinterPass(std::ostream &o,
bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
AFI = MF.getInfo<ARMFunctionInfo>();
- DW.SetModuleInfo(&getAnalysis<MachineModuleInfo>());
-
SetupMachineFunction(MF);
O << "\n";
@@ -800,6 +800,11 @@ bool ARMAsmPrinter::doInitialization(Module &M) {
bool Result = AsmPrinter::doInitialization(M);
+ // AsmPrinter::doInitialization should have done this analysis.
+ MMI = getAnalysisToUpdate<MachineModuleInfo>();
+ assert(MMI);
+ DW.SetModuleInfo(MMI);
+
// Darwin wants symbols to be quoted if they have complex names.
if (Subtarget->isTargetDarwin())
Mang->setUseQuotes(true);