#include "llvm/CodeGen/AsmPrinter.h"
#include "DwarfDebug.h"
#include "DwarfException.h"
-#include "Win64Exception.h"
+#include "WinException.h"
#include "WinCodeViewLineTables.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Statistic.h"
case WinEH::EncodingType::Invalid:
break;
case WinEH::EncodingType::Itanium:
- ES = new Win64Exception(this);
+ ES = new WinException(this);
break;
}
break;
-//===-- CodeGen/AsmPrinter/Win64Exception.cpp - Dwarf Exception Impl ------===//
+//===-- CodeGen/AsmPrinter/WinException.cpp - Dwarf Exception Impl ------===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#include "Win64Exception.h"
+#include "WinException.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Target/TargetRegisterInfo.h"
using namespace llvm;
-Win64Exception::Win64Exception(AsmPrinter *A)
+WinException::WinException(AsmPrinter *A)
: EHStreamer(A), shouldEmitPersonality(false), shouldEmitLSDA(false),
shouldEmitMoves(false) {}
-Win64Exception::~Win64Exception() {}
+WinException::~WinException() {}
/// endModule - Emit all exception information that should come after the
/// content.
-void Win64Exception::endModule() {
+void WinException::endModule() {
}
-void Win64Exception::beginFunction(const MachineFunction *MF) {
+void WinException::beginFunction(const MachineFunction *MF) {
shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA = false;
// If any landing pads survive, we need an EH table.
/// endFunction - Gather and emit post-function exception information.
///
-void Win64Exception::endFunction(const MachineFunction *MF) {
+void WinException::endFunction(const MachineFunction *MF) {
if (!shouldEmitPersonality && !shouldEmitMoves)
return;
Asm->OutStreamer->EmitWinCFIEndProc();
}
-const MCExpr *Win64Exception::createImageRel32(const MCSymbol *Value) {
+const MCExpr *WinException::createImageRel32(const MCSymbol *Value) {
if (!Value)
return MCConstantExpr::Create(0, Asm->OutContext);
return MCSymbolRefExpr::Create(Value, MCSymbolRefExpr::VK_COFF_IMGREL32,
Asm->OutContext);
}
-const MCExpr *Win64Exception::createImageRel32(const GlobalValue *GV) {
+const MCExpr *WinException::createImageRel32(const GlobalValue *GV) {
if (!GV)
return MCConstantExpr::Create(0, Asm->OutContext);
return createImageRel32(Asm->getSymbol(GV));
/// imagerel32 LabelLPad; // Zero means __finally.
/// } Entries[NumEntries];
/// };
-void Win64Exception::emitCSpecificHandlerTable() {
+void WinException::emitCSpecificHandlerTable() {
const std::vector<LandingPadInfo> &PadInfos = MMI->getLandingPads();
// Simplifying assumptions for first implementation:
}
}
-void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
+void WinException::emitCXXFrameHandler3Table(const MachineFunction *MF) {
const Function *F = MF->getFunction();
const Function *ParentF = MMI->getWinEHParent(F);
auto &OS = *Asm->OutStreamer;
-//===-- Win64Exception.h - Windows Exception Handling ----------*- C++ -*--===//
+//===-- WinException.h - Windows Exception Handling ----------*- C++ -*--===//
//
// The LLVM Compiler Infrastructure
//
class MachineFunction;
class MCExpr;
-class Win64Exception : public EHStreamer {
+class WinException : public EHStreamer {
/// Per-function flag to indicate if personality info should be emitted.
bool shouldEmitPersonality;
//===--------------------------------------------------------------------===//
// Main entry points.
//
- Win64Exception(AsmPrinter *A);
- ~Win64Exception() override;
+ WinException(AsmPrinter *A);
+ ~WinException() override;
/// Emit all exception information that should come after the content.
void endModule() override;