Order jump tables for deterministic or randomized emission. BUG= R=stichnot@chromium.org, jvoung, stichnot Review URL: https://codereview.chromium.org/1260183008.
diff --git a/src/IceSwitchLowering.h b/src/IceSwitchLowering.h index 34c9373..57c7d3c 100644 --- a/src/IceSwitchLowering.h +++ b/src/IceSwitchLowering.h
@@ -79,7 +79,6 @@ /// ELF section once the offsets from the start of the function are known. class JumpTableData { JumpTableData() = delete; - JumpTableData(const JumpTableData &) = delete; JumpTableData &operator=(const JumpTableData &) = delete; public: @@ -87,7 +86,9 @@ : FuncName(FuncName), Id(Id) { TargetOffsets.reserve(NumTargets); } + JumpTableData(const JumpTableData &) = default; JumpTableData(JumpTableData &&) = default; + JumpTableData &operator=(JumpTableData &&) = default; void pushTarget(intptr_t Offset) { TargetOffsets.emplace_back(Offset); } @@ -98,8 +99,8 @@ } private: - const IceString FuncName; - const SizeT Id; + IceString FuncName; + SizeT Id; std::vector<intptr_t> TargetOffsets; };