summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-05 04:09:18 +0000
committerChris Lattner <sabre@nondot.org>2009-08-05 04:09:18 +0000
commit3e5b272361cd1e5960f54f8c11d93e679354bde7 (patch)
treef00b3e1ccb16a011f41100eb8cafc72b5e615d7b /llvm/lib/CodeGen
parent2979eb8f35d90f242488e2e515bb20d4407d6f34 (diff)
downloadbcm5719-llvm-3e5b272361cd1e5960f54f8c11d93e679354bde7.tar.gz
bcm5719-llvm-3e5b272361cd1e5960f54f8c11d93e679354bde7.zip
add a temporary hook to allow reuse of the asmprinter from the disassembler.
llvm-svn: 78154
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 1de31bbc795..69bc5edf372 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1319,6 +1319,9 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) const {
/// processDebugLoc - Processes the debug information of each machine
/// instruction's DebugLoc.
void AsmPrinter::processDebugLoc(DebugLoc DL) {
+ if (!TAI || !DW)
+ return;
+
if (TAI->doesSupportDebugInformation() && DW->ShouldEmitDwarfDebug()) {
if (!DL.isUnknown()) {
DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);
OpenPOWER on IntegriCloud