[PATCH] D70834: [llvm] llvm-ifs: Support for handling empty IFS and merging weak+strong symbols.
Saleem Abdulrasool via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 29 10:38:41 PST 2019
compnerd added inline comments.
================
Comment at: llvm/tools/llvm-ifs/llvm-ifs.cpp:426
+ if (Stub.ObjectFileFormat == "")
+ Stub.ObjectFileFormat = TargetStub->ObjectFileFormat;
+
----------------
I would probably just write this as a ternary.
================
Comment at: llvm/tools/llvm-ifs/llvm-ifs.cpp:441
+ if (Stub.ObjectFileFormat != TargetStub->ObjectFileFormat &&
+ "" != TargetStub->ObjectFileFormat) {
WithColor::error() << "Interface Stub: ObjectFileFormat Mismatch."
----------------
Why the inverse check style here?
================
Comment at: llvm/tools/llvm-ifs/llvm-ifs.cpp:450
+ if (Stub.Triple != TargetStub->Triple &&
+ "" != TargetStub->Triple) {
WithColor::error() << "Interface Stub: Triple Mismatch."
----------------
Similar
================
Comment at: llvm/tools/llvm-ifs/llvm-ifs.cpp:501
}
- if (Symbol.Weak != SI->second.Weak) {
- // TODO: Add conflict resolution for Weak vs non-Weak.
- WithColor::error() << "Interface Stub: Weak Mismatch for "
- << Symbol.Name << ".\nFilename: " << InputFilePath
- << "\nWeak Values: " << SI->second.Weak << " "
- << Symbol.Weak << "\n";
-
- return -1;
+ if (Symbol.Weak != SI->second.Weak) {
+ Symbol.Weak = false;
----------------
Indentation seems off? Does this ensure that the rest of the symbol is identical? What happens if one of the size is different?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70834/new/
https://reviews.llvm.org/D70834
More information about the llvm-commits
mailing list