From d7ace1e5307c2c35e8c99ed2072c4a51dbbe154b Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 25 Aug 2009 02:27:42 +0000 Subject: [PATCH] Rename functions to something more descriptive. At the very least mention the CIE and FDE in their names. llvm-svn: 79969 --- llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 18 +++++++++++------- llvm/lib/CodeGen/AsmPrinter/DwarfException.h | 13 +++++++------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index c44e7b620920..a3c7705b002b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -49,8 +49,11 @@ DwarfException::~DwarfException() { delete ExceptionTimer; } -void DwarfException::EmitCommonEHFrame(const Function *Personality, - unsigned Index) { +/// EmitCommonInformationEntry - Emit a Common Information Entry (CIE). This +/// holds information that is shared among many Frame Description Entries. +/// There is at least one CIE in every non-empty .debug_frame section. +void DwarfException::EmitCommonInformationEntry(const Function *Personality, + unsigned Index) { // Size and sign of stack growth. int stackGrowth = Asm->TM.getFrameInfo()->getStackGrowthDirection() == @@ -144,9 +147,10 @@ void DwarfException::EmitCommonEHFrame(const Function *Personality, Asm->EOL(); } -/// EmitEHFrame - Emit function exception frame information. -/// -void DwarfException::EmitEHFrame(const FunctionEHFrameInfo &EHFrameInfo) { +/// EmitFrameDescriptionEntry - Emit the Frame Description Entry (FDE) for the +/// function. +void DwarfException:: +EmitFrameDescriptionEntry(const FunctionEHFrameInfo &EHFrameInfo) { assert(!EHFrameInfo.function->hasAvailableExternallyLinkage() && "Should not emit 'available externally' functions at all"); @@ -844,11 +848,11 @@ void DwarfException::EndModule() { if (shouldEmitMovesModule || shouldEmitTableModule) { const std::vector Personalities = MMI->getPersonalities(); for (unsigned i = 0; i < Personalities.size(); ++i) - EmitCommonEHFrame(Personalities[i], i); + EmitCommonInformationEntry(Personalities[i], i); for (std::vector::iterator I = EHFrames.begin(), E = EHFrames.end(); I != E; ++I) - EmitEHFrame(*I); + EmitFrameDescriptionEntry(*I); } if (TimePassesIsEnabled) diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.h b/llvm/lib/CodeGen/AsmPrinter/DwarfException.h index 5f4fda750286..8a9d56808cf1 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.h @@ -70,13 +70,14 @@ class VISIBILITY_HIDDEN DwarfException : public Dwarf { /// ExceptionTimer - Timer for the Dwarf exception writer. Timer *ExceptionTimer; - /// EmitCommonEHFrame - Emit the common eh unwind frame. - /// - void EmitCommonEHFrame(const Function *Personality, unsigned Index); + /// EmitCommonInformationEntry - Emit a Common Information Entry (CIE). This + /// holds information that is shared among many Frame Description Entries. + /// There is at least one CIE in every non-empty .debug_frame section. + void EmitCommonInformationEntry(const Function *Personality, unsigned Index); - /// EmitEHFrame - Emit function exception frame information. - /// - void EmitEHFrame(const FunctionEHFrameInfo &EHFrameInfo); + /// EmitFrameDescriptionEntry - Emit the Frame Description Entry (FDE) for the + /// function. + void EmitFrameDescriptionEntry(const FunctionEHFrameInfo &EHFrameInfo); /// EmitExceptionTable - Emit landing pads and actions. ///