From ccabbfff86a00a0b211f5d0835916a1250ebcf0f Mon Sep 17 00:00:00 2001 From: Huan Nguyen Date: Thu, 28 Jul 2022 23:15:20 -0700 Subject: [PATCH] [BOLT] Remove --allow-stripped option AllowStripped has not been used in BOLT. This option is replaced by actively detecting stripped binary. Test Plan: Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D130036 --- bolt/lib/Rewrite/RewriteInstance.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp index 3224aa9f3ec2..e2957ef0c9a7 100644 --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -92,12 +92,6 @@ cl::opt "output binary via bolt info section"), cl::cat(BoltCategory)); -cl::opt -AllowStripped("allow-stripped", - cl::desc("allow processing of stripped binaries"), - cl::Hidden, - cl::cat(BoltCategory)); - cl::opt DumpDotAll( "dump-dot-all", cl::desc("dump function CFGs to graphviz format after each stage;" @@ -2813,13 +2807,11 @@ void RewriteInstance::preprocessProfileData() { if (Error E = ProfileReader->preprocessProfile(*BC.get())) report_error("cannot pre-process profile", std::move(E)); - if (!BC->hasSymbolsWithFileName() && ProfileReader->hasLocalsWithFileName() && - !opts::AllowStripped) { + if (!BC->hasSymbolsWithFileName() && ProfileReader->hasLocalsWithFileName()) { errs() << "BOLT-ERROR: input binary does not have local file symbols " "but profile data includes function names with embedded file " "names. It appears that the input binary was stripped while a " - "profiled binary was not. If you know what you are doing and " - "wish to proceed, use -allow-stripped option.\n"; + "profiled binary was not\n"; exit(1); } }