mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-30 00:26:06 +00:00

This change removes the `tidyLandingPads` function, which previously had a few responsibilities: 1. Dealing with the deletion of an invoke, after MachineFunction lowering. 2. Dealing with the deletion of a landing pad BB, after MachineFunction lowering. 3. Cleaning up the type-id list generated by `MachineFunction::addLandingPad`. Case 3 has been fixed in the generator, and the others are now handled during table emission. This change also removes `MachineFunction`'s `addCatchTypeInfo`, `addFilterTypeInfo`, and `addCleanup` helper fns, as they had a single caller, and being outlined didn't make it simpler. Finally, as calling `tidyLandingPads` was effectively the only thing `DwarfCFIExceptionBase` did, that class has been eliminated.
45 lines
1.4 KiB
C++
45 lines
1.4 KiB
C++
//===-- WasmException.h - Wasm Exception Framework -------------*- C++ -*--===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains support for writing WebAssembly exception info into asm
|
|
// files.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_WASMEXCEPTION_H
|
|
#define LLVM_LIB_CODEGEN_ASMPRINTER_WASMEXCEPTION_H
|
|
|
|
#include "EHStreamer.h"
|
|
|
|
namespace llvm {
|
|
class AsmPrinter;
|
|
class MachineFunction;
|
|
struct LandingPadInfo;
|
|
template <typename T> class SmallVectorImpl;
|
|
|
|
class LLVM_LIBRARY_VISIBILITY WasmException : public EHStreamer {
|
|
public:
|
|
WasmException(AsmPrinter *A) : EHStreamer(A) {}
|
|
|
|
void endModule() override;
|
|
void beginFunction(const MachineFunction *MF) override {}
|
|
void endFunction(const MachineFunction *MF) override;
|
|
|
|
protected:
|
|
// Compute the call site table for wasm EH.
|
|
void computeCallSiteTable(
|
|
SmallVectorImpl<CallSiteEntry> &CallSites,
|
|
SmallVectorImpl<CallSiteRange> &CallSiteRanges,
|
|
const SmallVectorImpl<const LandingPadInfo *> &LandingPads,
|
|
const SmallVectorImpl<unsigned> &FirstActions) override;
|
|
};
|
|
|
|
} // End of namespace llvm
|
|
|
|
#endif
|