[PATCH] D43011: [ELF] Create and export symbols provided by a linker script if they referenced by DSOs.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 06:34:09 PST 2018


grimar accepted this revision.
grimar added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: arichardson.

This LGTM, thanks (minor nit below).
Please wait for approval from other reviewers.



================
Comment at: ELF/LinkerScript.cpp:134
+  for (InputFile *F : SharedFiles)
+    if (F->getUndefinedSymbols().find(Cmd->Name) !=
+        F->getUndefinedSymbols().end())
----------------
You should be able to use `count` I believe:

```
for (InputFile *F : SharedFiles)
  if (F->getUndefinedSymbols().count(Cmd->Name))
    return true;
```


https://reviews.llvm.org/D43011





More information about the llvm-commits mailing list