aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-ifs/llvm-ifs.cpp
diff options
context:
space:
mode:
authorAlex Brachet <abrachet@google.com>2022-05-02 17:49:06 +0000
committerAlex Brachet <abrachet@google.com>2022-05-02 17:49:06 +0000
commit7aaad7b18322a22555b2fbb0ad686f23f44502c8 (patch)
tree954d00c60329baa893c98660ad963c94e7bac6aa /llvm/tools/llvm-ifs/llvm-ifs.cpp
parent304378fd096755950939f2d3dbb4f724bba0d6cb (diff)
downloadllvm-7aaad7b18322a22555b2fbb0ad686f23f44502c8.zip
llvm-7aaad7b18322a22555b2fbb0ad686f23f44502c8.tar.gz
llvm-7aaad7b18322a22555b2fbb0ad686f23f44502c8.tar.bz2
[ifs] Fix bug where exclude only excluded when outputting ifs files
Now output elf files will also have excluded symbols removed. Reviewed By: haowei Differential Revision: https://reviews.llvm.org/D124781
Diffstat (limited to 'llvm/tools/llvm-ifs/llvm-ifs.cpp')
-rw-r--r--llvm/tools/llvm-ifs/llvm-ifs.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/tools/llvm-ifs/llvm-ifs.cpp b/llvm/tools/llvm-ifs/llvm-ifs.cpp
index bf81a60..1ac8c0d 100644
--- a/llvm/tools/llvm-ifs/llvm-ifs.cpp
+++ b/llvm/tools/llvm-ifs/llvm-ifs.cpp
@@ -429,6 +429,9 @@ int main(int argc, char *argv[]) {
if (StripNeededLibs)
Stub.NeededLibs.clear();
+ if (Error E = filterIFSSyms(Stub, StripUndefined, ExcludeSyms))
+ fatalError(std::move(E));
+
if (OutputELFFilePath.getNumOccurrences() == 0 &&
OutputIFSFilePath.getNumOccurrences() == 0 &&
OutputTBDFilePath.getNumOccurrences() == 0) {
@@ -485,8 +488,6 @@ int main(int argc, char *argv[]) {
stripIFSTarget(Stub, StripIFSTarget, StripIFSArch,
StripIFSEndiannessWidth, StripIFSBitWidth);
}
- if (Error E = filterIFSSyms(Stub, StripUndefined, ExcludeSyms))
- fatalError(std::move(E));
Error IFSWriteError = writeIFS(OutputFilePath.getValue(), Stub);
if (IFSWriteError)
fatalError(std::move(IFSWriteError));
@@ -537,8 +538,6 @@ int main(int argc, char *argv[]) {
stripIFSTarget(Stub, StripIFSTarget, StripIFSArch,
StripIFSEndiannessWidth, StripIFSBitWidth);
}
- if (Error E = filterIFSSyms(Stub, StripUndefined, ExcludeSyms))
- fatalError(std::move(E));
Error IFSWriteError = writeIFS(OutputIFSFilePath.getValue(), Stub);
if (IFSWriteError)
fatalError(std::move(IFSWriteError));