Skip to content

Commit a79acb0

Browse files
authored
[BOLT] Fix setHasSymbolsWithFileName (#92625)
The function is used to ignore the parameter and set `HasSymbolsWithFileName` unconditionally.
1 parent c93a670 commit a79acb0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class BinaryContext {
359359
void setFileBuildID(StringRef ID) { FileBuildID = std::string(ID); }
360360

361361
bool hasSymbolsWithFileName() const { return HasSymbolsWithFileName; }
362-
void setHasSymbolsWithFileName(bool Value) { HasSymbolsWithFileName = true; }
362+
void setHasSymbolsWithFileName(bool Value) { HasSymbolsWithFileName = Value; }
363363

364364
/// Return true if relocations against symbol with a given name
365365
/// must be created.

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ void RewriteInstance::registerFragments() {
14971497
if (!BC->hasSymbolsWithFileName()) {
14981498
BC->errs() << "BOLT-ERROR: input file has split functions but does not "
14991499
"have FILE symbols. If the binary was stripped, preserve "
1500-
"FILE symbols with --keep-file-symbols strip option";
1500+
"FILE symbols with --keep-file-symbols strip option\n";
15011501
exit(1);
15021502
}
15031503

0 commit comments

Comments
 (0)