emit_x64: Make GetBasicBlock() const qualified

This commit is contained in:
Lioncash 2016-12-04 23:27:05 -05:00 committed by Merry
parent 6a16edc0fb
commit fafa845f64
2 changed files with 2 additions and 2 deletions

View file

@ -99,7 +99,7 @@ EmitX64::BlockDescriptor EmitX64::Emit(IR::Block& block) {
return basic_blocks[descriptor]; return basic_blocks[descriptor];
} }
boost::optional<EmitX64::BlockDescriptor> EmitX64::GetBasicBlock(IR::LocationDescriptor descriptor) { boost::optional<EmitX64::BlockDescriptor> EmitX64::GetBasicBlock(IR::LocationDescriptor descriptor) const {
auto iter = basic_blocks.find(descriptor); auto iter = basic_blocks.find(descriptor);
if (iter == basic_blocks.end()) if (iter == basic_blocks.end())
return boost::none; return boost::none;

View file

@ -47,7 +47,7 @@ public:
BlockDescriptor Emit(IR::Block& ir); BlockDescriptor Emit(IR::Block& ir);
/// Looks up an emitted host block in the cache. /// Looks up an emitted host block in the cache.
boost::optional<BlockDescriptor> GetBasicBlock(IR::LocationDescriptor descriptor); boost::optional<BlockDescriptor> GetBasicBlock(IR::LocationDescriptor descriptor) const;
/// Empties the cache. /// Empties the cache.
void ClearCache(); void ClearCache();