[PATCH] D134097: [NFC] Refactor creation of symbol+addend references

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 14:10:20 PDT 2022


rafauler added inline comments.


================
Comment at: bolt/lib/Core/BinaryFunction.cpp:1054
+  (void)ReplaceSuccess;
+  assert(ReplaceSuccess && "failed to replace mem operand with symbol+off");
 }
----------------
yota9 wrote:
> Maybe change assert to if + exit ?
Are we migrating away from assertions? This is not supposed to fail at all, unless we modify our codebase in weird ways, so I would like to assert here. But I'm not sure how hard are people trying to get rid of assertions.

Another reason this might fail is if somebody is writing a new backend and fails to replace the memory operand of a given instruction that they need to support replacing.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134097/new/

https://reviews.llvm.org/D134097



More information about the llvm-commits mailing list