[llvm] [BOLT][NFC] Remove redundant assertion (PR #82056)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 14:36:38 PST 2024


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

processLKSections() used to be a member of RewriteInstance. Since now it is part of the LinuxKernelRewriter, the assertion is no longer needed.

>From 47d1ebbec065208dc90011d184f4083b78c64fd0 Mon Sep 17 00:00:00 2001
From: Maksim Panchenko <maks at fb.com>
Date: Fri, 16 Feb 2024 14:33:14 -0800
Subject: [PATCH] [BOLT][NFC] Remove redundant assertion

processLKSections() used to be a member of RewriteInstance. Since now it
is part of the LinuxKernelRewriter, the assertion is no longer needed.
---
 bolt/lib/Rewrite/LinuxKernelRewriter.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/bolt/lib/Rewrite/LinuxKernelRewriter.cpp b/bolt/lib/Rewrite/LinuxKernelRewriter.cpp
index 0f99e278fe16c2..212e172c266c8d 100644
--- a/bolt/lib/Rewrite/LinuxKernelRewriter.cpp
+++ b/bolt/lib/Rewrite/LinuxKernelRewriter.cpp
@@ -221,8 +221,6 @@ void LinuxKernelRewriter::insertLKMarker(uint64_t PC, uint64_t SectionOffset,
 }
 
 void LinuxKernelRewriter::processLKSections() {
-  assert(BC.IsLinuxKernel && "Linux kernel binary expected.");
-
   processLKExTable();
   processLKPCIFixup();
   processLKKSymtab();



More information about the llvm-commits mailing list