SwitchToDataSection(""); // Reset back to no section.
- if (MachineModuleInfo *MMI = getAnalysisToUpdate<MachineModuleInfo>()) {
- MMI->AnalyzeModule(M);
- }
+ MMI = getAnalysisToUpdate<MachineModuleInfo>();
+ if (MMI) MMI->AnalyzeModule(M);
return false;
}
else if (!I->hasInternalLinkage())
assert(0 && "Invalid alias linkage");
- O << TAI->getSetDirective() << Name << ", " << Target << "\n";
+ O << TAI->getSetDirective() << ' ' << Name << ", " << Target << "\n";
// If the aliasee has external weak linkage it can be referenced only by
// alias itself. In this case it can be not in ExtWeakSymbols list. Emit
/// printDeclare - This method prints a local variable declaration used by
/// debug tables.
+/// FIXME: It doesn't really print anything rather it inserts a DebugVariable
+/// entry into dwarf table.
void AsmPrinter::printDeclare(const MachineInstr *MI) const {
- // Do nothing.
+ int FI = MI->getOperand(0).getIndex();
+ GlobalValue *GV = MI->getOperand(1).getGlobal();
+ MMI->RecordVariable(GV, FI);
}
/// PrintAsmOperand - Print the specified operand of MI, an INLINEASM