diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 2d82f81ed70..c9b0f9aa556 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -964,31 +964,6 @@ void AsmPrinter::emitFrameAlloc(const MachineInstr &MI) { MCConstantExpr::create(FrameOffset, OutContext)); } -void AsmPrinter::emitStackSizeSection(const MachineFunction &MF) { - if (!MF.getTarget().Options.EmitStackSizeSection) - return; - - MCSection *StackSizeSection = getObjFileLowering().getStackSizesSection(); - if (!StackSizeSection) - return; - - const MachineFrameInfo &FrameInfo = MF.getFrameInfo(); - // Don't emit functions with dynamic stack allocations. - if (FrameInfo.hasVarSizedObjects()) - return; - - OutStreamer->PushSection(); - OutStreamer->SwitchSection(StackSizeSection); - - const MCSymbol *FunctionSymbol = getSymbol(MF.getFunction()); - uint64_t StackSize = FrameInfo.getStackSize(); - OutStreamer->EmitValue(MCSymbolRefExpr::create(FunctionSymbol, OutContext), - /* size = */ 8); - OutStreamer->EmitULEB128IntValue(StackSize); - - OutStreamer->PopSection(); -} - static bool needFuncLabelsForEHOrDebugInfo(const MachineFunction &MF, MachineModuleInfo *MMI) { if (!MF.getLandingPads().empty() || MF.hasEHFunclets() || MMI->hasDebugInfo()) @@ -1160,9 +1135,6 @@ void AsmPrinter::EmitFunctionBody() { HI.Handler->endFunction(MF); } - // Emit section containing stack size metadata. - emitStackSizeSection(*MF); - if (isVerbose()) OutStreamer->GetCommentOS() << "-- End function\n"; |