[llvm] [BOLT][NFC] Remove unused function (PR #89009)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 17:48:01 PDT 2024


https://github.com/maksfb created https://github.com/llvm/llvm-project/pull/89009

getFileOffsetFor() was replaced with getFileOffsetForAddress().

>From 77ddc8534e61b82d3ca72274f02dbf50a0469d1f Mon Sep 17 00:00:00 2001
From: Maksim Panchenko <maks at fb.com>
Date: Tue, 16 Apr 2024 17:44:33 -0700
Subject: [PATCH] [BOLT][NFC] Remove unused function

getFileOffsetFor() was replaced with getFileOffsetForAddress().
---
 bolt/include/bolt/Rewrite/RewriteInstance.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/bolt/include/bolt/Rewrite/RewriteInstance.h b/bolt/include/bolt/Rewrite/RewriteInstance.h
index 826677cd63b22b..7a261f611eaf26 100644
--- a/bolt/include/bolt/Rewrite/RewriteInstance.h
+++ b/bolt/include/bolt/Rewrite/RewriteInstance.h
@@ -368,13 +368,6 @@ class RewriteInstance {
   /// rewritten binary.
   void patchBuildID();
 
-  /// Return file offset corresponding to a given virtual address.
-  uint64_t getFileOffsetFor(uint64_t Address) {
-    assert(Address >= NewTextSegmentAddress &&
-           "address in not in the new text segment");
-    return Address - NewTextSegmentAddress + NewTextSegmentOffset;
-  }
-
   /// Return file offset corresponding to a virtual \p Address.
   /// Return 0 if the address has no mapping in the file, including being
   /// part of .bss section.



More information about the llvm-commits mailing list