Skip to content

Commit 35d1a90

Browse files
committed
Address comments
1 parent be8107a commit 35d1a90

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

llvm/include/llvm/CodeGen/MachineFunction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ class LLVM_EXTERNAL_VISIBILITY MachineFunction {
395395

396396
/// Clear all the members of this MachineFunction, but the ones used to
397397
/// initialize again the MachineFunction. More specifically, this deallocates
398-
/// all the dynamically allocated objects and get rid of all the XXXInfo data
399-
/// structure, but keep unchanged the references to Fn, Target, and
398+
/// all the dynamically allocated objects and get rids of all the XXXInfo data
399+
/// structure, but keeps unchanged the references to Fn, Target, and
400400
/// FunctionNumber.
401401
void clear();
402402
/// Allocate and initialize the different members.

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,6 @@ AsmPrinter::getFunctionCFISectionType(const Function &F) const {
12771277
if (MAI->usesCFIWithoutEH() && F.hasUWTable())
12781278
return CFISection::EH;
12791279

1280-
assert(MMI != nullptr && "Invalid machine module info");
12811280
if (hasDebugInfo() || TM.Options.ForceDwarfFrameSection)
12821281
return CFISection::Debug;
12831282

@@ -1670,9 +1669,9 @@ void AsmPrinter::emitPCSections(const MachineFunction &MF) {
16701669

16711670
/// Returns true if function begin and end labels should be emitted.
16721671
static bool needFuncLabels(const MachineFunction &MF, const AsmPrinter &Asm) {
1673-
if (!MF.getLandingPads().empty() || MF.hasEHFunclets() ||
1674-
MF.getFunction().hasMetadata(LLVMContext::MD_pcsections) ||
1675-
Asm.hasDebugInfo())
1672+
if (Asm.hasDebugInfo() || !MF.getLandingPads().empty() ||
1673+
MF.hasEHFunclets() ||
1674+
MF.getFunction().hasMetadata(LLVMContext::MD_pcsections))
16761675
return true;
16771676

16781677
// We might emit an EH table that uses function begin and end labels even if

0 commit comments

Comments
 (0)