[PATCH] Generalize debug info / EH emission in AsmPrinter
Eric Christopher
echristo at gmail.com
Mon Nov 25 12:59:35 PST 2013
================
Comment at: lib/CodeGen/AsmPrinter/ARMException.cpp:57
@@ -59,3 +56,3 @@
/// being emitted immediately after the function entry point.
-void ARMException::BeginFunction(const MachineFunction *MF) {
+void ARMException::beginFunction(const MachineFunction *MF) {
getTargetStreamer().emitFnStart();
----------------
Renames like this should probably happen separately.
================
Comment at: lib/CodeGen/AsmPrinter/DIE.cpp:389
@@ -388,2 +388,3 @@
// references have the same size as an address on the target system.
- if (AP->getDwarfDebug()->getDwarfVersion() == 2)
+ unsigned DwarfVersion = AP->getDwarfVersion();
+ assert(DwarfVersion && "Expected Dwarf Debug info to be available");
----------------
This is what I worry about from merging the EH and Debug Info classes. This assert should never be able to fire, and while "it's just an assert" theoretically we need that assert in a lot more places.
I guess what I'm saying is that it's not obvious the assert is necessary to me. How did you run into it in the first place?
================
Comment at: lib/CodeGen/AsmPrinter/DwarfCFIException.cpp:87
@@ -86,3 +86,3 @@
/// being emitted immediately after the function entry point.
-void DwarfCFIException::BeginFunction(const MachineFunction *MF) {
+void DwarfCFIException::beginFunction(const MachineFunction *MF) {
shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA = false;
----------------
Ditto with the renaming here.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1832
@@ -1824,3 +1831,3 @@
SmallPtrSet<const MDNode *, 16> ProcessedVars;
- collectVariableInfo(MF, ProcessedVars);
+ collectVariableInfo(CurFn, ProcessedVars);
----------------
Should be able to get rid of the MachineFunction * argument here yes?
http://llvm-reviews.chandlerc.com/D2222
More information about the llvm-commits
mailing list