-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[BOLT] Fix setHasSymbolsWithFileName #92625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The function is used to ignore the parameter and set `HasSymbolsWithFileName` unconditionally.
@llvm/pr-subscribers-bolt Author: Amir Ayupov (aaupov) ChangesThe function is used to ignore the parameter and set Full diff: https://github.com/llvm/llvm-project/pull/92625.diff 1 Files Affected:
diff --git a/bolt/include/bolt/Core/BinaryContext.h b/bolt/include/bolt/Core/BinaryContext.h
index 75765819ac464..792c09dd7c467 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -359,7 +359,7 @@ class BinaryContext {
void setFileBuildID(StringRef ID) { FileBuildID = std::string(ID); }
bool hasSymbolsWithFileName() const { return HasSymbolsWithFileName; }
- void setHasSymbolsWithFileName(bool Value) { HasSymbolsWithFileName = true; }
+ void setHasSymbolsWithFileName(bool Value) { HasSymbolsWithFileName = Value; }
/// Return true if relocations against symbol with a given name
/// must be created.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this function at all? Can something be ever set to false?
Yes, if the input file has file symbols stripped, we will incorrectly set it to true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This reverts commit ccabbff. Reintroduce allow-stripped as a fallback mechanism after enforcement of HasSymbolsWithFileName was fixed in llvm#92625.
The function is used to ignore the parameter and set
HasSymbolsWithFileName
unconditionally.