X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FMC%2FMCWin64EH.h;h=eb4665a2e994c2106e8e41119fcecfdcda2299b8;hb=645016533d1208d2e7a17d917d64b8b63c4f9939;hp=39f304654662002e28391f2f338ef618a969222a;hpb=3185f5c35322cbd10040ab20f265042d477efe62;p=oota-llvm.git diff --git a/include/llvm/MC/MCWin64EH.h b/include/llvm/MC/MCWin64EH.h index 39f30465466..eb4665a2e99 100644 --- a/include/llvm/MC/MCWin64EH.h +++ b/include/llvm/MC/MCWin64EH.h @@ -20,6 +20,7 @@ #include namespace llvm { + class StringRef; class MCStreamer; class MCSymbol; @@ -28,30 +29,31 @@ namespace llvm { typedef Win64EH::UnwindOpcodes OpType; private: OpType Operation; + MCSymbol *Label; unsigned Offset; unsigned Register; public: - MCWin64EHInstruction(OpType Op, unsigned Reg) - : Operation(Op), Offset(0), Register(Reg) { - assert(Op == Win64EH::UOP_PushNonVol); + MCWin64EHInstruction(OpType Op, MCSymbol *L, unsigned Reg) + : Operation(Op), Label(L), Offset(0), Register(Reg) { + assert(Op == Win64EH::UOP_PushNonVol); } - MCWin64EHInstruction(unsigned Size) + MCWin64EHInstruction(MCSymbol *L, unsigned Size) : Operation(Size>128 ? Win64EH::UOP_AllocLarge : Win64EH::UOP_AllocSmall), - Offset(Size) { } - MCWin64EHInstruction(OpType Op, unsigned Reg, - unsigned Off) - : Operation(Op), Offset(Off), Register(Reg) { + 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, bool Code) - : Operation(Op), Offset(Code ? 1 : 0) { + 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; } @@ -79,6 +81,7 @@ namespace llvm { class MCWin64EHUnwindEmitter { public: + static StringRef GetSectionSuffix(const MCSymbol *func); // // This emits the unwind info sections (.pdata and .xdata in PE/COFF). //