diff options
| author | Heejin Ahn <aheejin@gmail.com> | 2018-10-25 23:45:48 +0000 |
|---|---|---|
| committer | Heejin Ahn <aheejin@gmail.com> | 2018-10-25 23:45:48 +0000 |
| commit | 3103d3dcd18cc2b91441dd47f03a4f7da74cdcd1 (patch) | |
| tree | 74959f3b0fb62def55b267a6c55c7f7dd99eb403 /llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h | |
| parent | f213f81d9ca40d3a7a154a6914a659806a67293c (diff) | |
| download | bcm5719-llvm-3103d3dcd18cc2b91441dd47f03a4f7da74cdcd1.tar.gz bcm5719-llvm-3103d3dcd18cc2b91441dd47f03a4f7da74cdcd1.zip | |
[WebAssembly] Support EH instructions in InstPrinter
Summary: This adds support for exception handling instructions to InstPrinter.
Reviewers: dschuff, aardappel
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D53634
llvm-svn: 345343
Diffstat (limited to 'llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h index 18023328b38..ded64f9a6e9 100644 --- a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h +++ b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h @@ -25,8 +25,13 @@ namespace llvm { class MCSubtargetInfo; class WebAssemblyInstPrinter final : public MCInstPrinter { - uint64_t ControlFlowCounter; - SmallVector<std::pair<uint64_t, bool>, 0> ControlFlowStack; + uint64_t ControlFlowCounter = 0; + uint64_t EHPadStackCounter = 0; + SmallVector<std::pair<uint64_t, bool>, 4> ControlFlowStack; + SmallVector<uint64_t, 4> EHPadStack; + + enum EHInstKind { TRY, CATCH, END_TRY }; + EHInstKind LastSeenEHInst = END_TRY; public: WebAssemblyInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII, |

