/usr/include/llvm-3.4/llvm/MC/MCWin64EH.h is in llvm-3.4-dev 1:3.4-1ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | //===- MCWin64EH.h - Machine Code Win64 EH support --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file contains declarations to support the Win64 Exception Handling
// scheme in MC.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCWIN64EH_H
#define LLVM_MC_MCWIN64EH_H
#include "llvm/Support/Win64EH.h"
#include <cassert>
#include <vector>
namespace llvm {
class StringRef;
class MCStreamer;
class MCSymbol;
class MCWin64EHInstruction {
public:
typedef Win64EH::UnwindOpcodes OpType;
private:
OpType Operation;
MCSymbol *Label;
unsigned Offset;
unsigned Register;
public:
MCWin64EHInstruction(OpType Op, MCSymbol *L, unsigned Reg)
: Operation(Op), Label(L), Offset(0), Register(Reg) {
assert(Op == Win64EH::UOP_PushNonVol);
}
MCWin64EHInstruction(MCSymbol *L, unsigned Size)
: Operation(Size>128 ? Win64EH::UOP_AllocLarge : Win64EH::UOP_AllocSmall),
Label(L), Offset(Size) { }
MCWin64EHInstruction(OpType Op, MCSymbol *L, unsigned Reg, unsigned Off)
: Operation(Op), Label(L), Offset(Off), Register(Reg) {
assert(Op == Win64EH::UOP_SetFPReg ||
Op == Win64EH::UOP_SaveNonVol ||
Op == Win64EH::UOP_SaveNonVolBig ||
Op == Win64EH::UOP_SaveXMM128 ||
Op == Win64EH::UOP_SaveXMM128Big);
}
MCWin64EHInstruction(OpType Op, MCSymbol *L, bool Code)
: Operation(Op), Label(L), Offset(Code ? 1 : 0) {
assert(Op == Win64EH::UOP_PushMachFrame);
}
OpType getOperation() const { return Operation; }
MCSymbol *getLabel() const { return Label; }
unsigned getOffset() const { return Offset; }
unsigned getSize() const { return Offset; }
unsigned getRegister() const { return Register; }
bool isPushCodeFrame() const { return Offset == 1; }
};
struct MCWin64EHUnwindInfo {
MCWin64EHUnwindInfo() : Begin(0), End(0), ExceptionHandler(0),
Function(0), PrologEnd(0), Symbol(0),
HandlesUnwind(false), HandlesExceptions(false),
LastFrameInst(-1), ChainedParent(0),
Instructions() {}
MCSymbol *Begin;
MCSymbol *End;
const MCSymbol *ExceptionHandler;
const MCSymbol *Function;
MCSymbol *PrologEnd;
MCSymbol *Symbol;
bool HandlesUnwind;
bool HandlesExceptions;
int LastFrameInst;
MCWin64EHUnwindInfo *ChainedParent;
std::vector<MCWin64EHInstruction> Instructions;
};
class MCWin64EHUnwindEmitter {
public:
static StringRef GetSectionSuffix(const MCSymbol *func);
//
// This emits the unwind info sections (.pdata and .xdata in PE/COFF).
//
static void Emit(MCStreamer &streamer);
static void EmitUnwindInfo(MCStreamer &streamer, MCWin64EHUnwindInfo *info);
};
} // end namespace llvm
#endif
|