From 6a161cbfd458ab2af39b382056dff515ff549eb6 Mon Sep 17 00:00:00 2001 From: Maksim Panchenko Date: Sun, 2 Mar 2025 23:40:02 -0800 Subject: [PATCH] [BOLT] Remove BinaryFunction::IsPatched. NFC (#129461) BinaryFunction::IsPatched is no longer used. --- bolt/include/bolt/Core/BinaryFunction.h | 8 -------- bolt/lib/Passes/PatchEntries.cpp | 2 -- 2 files changed, 10 deletions(-) diff --git a/bolt/include/bolt/Core/BinaryFunction.h b/bolt/include/bolt/Core/BinaryFunction.h index 942840a7621f..c9ccb69ab52c 100644 --- a/bolt/include/bolt/Core/BinaryFunction.h +++ b/bolt/include/bolt/Core/BinaryFunction.h @@ -343,9 +343,6 @@ private: /// True if the function uses ORC format for stack unwinding. bool HasORC{false}; - /// True if the original entry point was patched. - bool IsPatched{false}; - /// True if the function contains explicit or implicit indirect branch to its /// split fragments, e.g., split jump table, landing pad in split fragment bool HasIndirectTargetToSplitFragment{false}; @@ -1376,9 +1373,6 @@ public: /// Return true if the function uses ORC format for stack unwinding. bool hasORC() const { return HasORC; } - /// Return true if the original entry point was patched. - bool isPatched() const { return IsPatched; } - const JumpTable *getJumpTable(const MCInst &Inst) const { const uint64_t Address = BC.MIB->getJumpTable(Inst); return getJumpTableContainingAddress(Address); @@ -1729,8 +1723,6 @@ public: /// Mark function that should not be emitted. void setIgnored(); - void setIsPatched(bool V) { IsPatched = V; } - void setHasIndirectTargetToSplitFragment(bool V) { HasIndirectTargetToSplitFragment = V; } diff --git a/bolt/lib/Passes/PatchEntries.cpp b/bolt/lib/Passes/PatchEntries.cpp index a647dc16820e..4ce9c09b311d 100644 --- a/bolt/lib/Passes/PatchEntries.cpp +++ b/bolt/lib/Passes/PatchEntries.cpp @@ -130,8 +130,6 @@ Error PatchEntries::runOnFunctions(BinaryContext &BC) { assert(!ColdSize && "unexpected cold code"); assert(HotSize <= PatchSize && "max patch size exceeded"); } - - Function.setIsPatched(true); } return Error::success(); }