Skip to content

Commit

Permalink
CodeEmitter: Remove unused Bind validation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
neobrain committed Jan 22, 2025
1 parent 4282f96 commit 264f3be
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions CodeEmitter/CodeEmitter/Emitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -744,11 +744,7 @@ class Emitter : public ARMEmitter::Buffer {
// Bind a forward label to a location.
// This walks all the instructions in the label's vector.
// Then backpatching all instructions that have used the label.
template<bool WarnAboutEmpty = false>
void Bind(ForwardLabel* Label) {
if constexpr (WarnAboutEmpty) {
LOGMAN_THROW_A_FMT(Label->FirstInst.Location != nullptr, "Binding forward label that didn't have any instructions using it");
}
if (Label->FirstInst.Location) {
Bind(&Label->FirstInst);
}
Expand All @@ -763,7 +759,7 @@ class Emitter : public ARMEmitter::Buffer {
if (!Label->Backward.Location) {
Bind(&Label->Backward);
}
Bind<false>(&Label->Forward);
Bind(&Label->Forward);
}

#include <CodeEmitter/VixlUtils.inl>
Expand Down

0 comments on commit 264f3be

Please sign in to comment.