diff --git a/src/backend_x64/emit_x64.cpp b/src/backend_x64/emit_x64.cpp index f2afbc1a..cc40f810 100644 --- a/src/backend_x64/emit_x64.cpp +++ b/src/backend_x64/emit_x64.cpp @@ -99,7 +99,7 @@ EmitX64::BlockDescriptor EmitX64::Emit(IR::Block& block) { return basic_blocks[descriptor]; } -boost::optional EmitX64::GetBasicBlock(IR::LocationDescriptor descriptor) { +boost::optional EmitX64::GetBasicBlock(IR::LocationDescriptor descriptor) const { auto iter = basic_blocks.find(descriptor); if (iter == basic_blocks.end()) return boost::none; diff --git a/src/backend_x64/emit_x64.h b/src/backend_x64/emit_x64.h index f4585a6d..1308de54 100644 --- a/src/backend_x64/emit_x64.h +++ b/src/backend_x64/emit_x64.h @@ -47,7 +47,7 @@ public: BlockDescriptor Emit(IR::Block& ir); /// Looks up an emitted host block in the cache. - boost::optional GetBasicBlock(IR::LocationDescriptor descriptor); + boost::optional GetBasicBlock(IR::LocationDescriptor descriptor) const; /// Empties the cache. void ClearCache();