[PATCH] D58180: lld/coff: Simplify error message for comdat selection mismatches

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 13:08:25 PST 2019


ruiu added inline comments.


================
Comment at: lld/COFF/InputFiles.cpp:502-505
+        log(("conflicting comdat type for " + toString(*Leader) +
                            ": " + Twine((int)LeaderSelection) + " in " +
                            toString(Leader->getFile()) + " and " +
                            Twine((int)Selection) + " in " + toString(this))
----------------
clang-format?


================
Comment at: lld/COFF/InputFiles.cpp:510
+        // To make the switch below not emit another error.
+        Selection = IMAGE_COMDAT_SELECT_ANY;
       }
----------------
I'd return early instead of doing this to effectively disable the following code, but you can't do that because we want to execute the code after the following `switch`. Maybe it's time to split this into a new function?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58180/new/

https://reviews.llvm.org/D58180





More information about the llvm-commits mailing list