basic_block: Mark move constructor and assignment as noexcept

Allows the type to play nicely with standard library facilities better
(also we shouldn't be throwing in move operations to begin with).
This commit is contained in:
Lioncash 2020-08-14 14:38:26 -04:00
parent 34f4d99454
commit 4f12e86ebb
2 changed files with 4 additions and 4 deletions

@ -27,9 +27,9 @@ Block::Block(const LocationDescriptor& location)
Block::~Block() = default;
Block::Block(Block&&) = default;
Block::Block(Block&&) noexcept = default;
Block& Block::operator=(Block&&) = default;
Block& Block::operator=(Block&&) noexcept = default;
void Block::AppendNewInst(Opcode opcode, std::initializer_list<IR::Value> args) {
PrependNewInst(end(), opcode, args);

@ -47,8 +47,8 @@ public:
Block(const Block&) = delete;
Block& operator=(const Block&) = delete;
Block(Block&&);
Block& operator=(Block&&);
Block(Block&&) noexcept;
Block& operator=(Block&&) noexcept;
bool empty() const { return instructions.empty(); }
size_type size() const { return instructions.size(); }