MaskRay marked 2 inline comments as done. MaskRay added inline comments.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2093 + "Only globals with definition can force usage."); + if (getTriple().isOSBinFormatELF()) + LLVMCompilerUsed.emplace_back(GV); ---------------- JonChesterfield wrote: > ^ this specifically looks wrong, which array the variable goes in should be > based on what the variable is used for or what the programmer asked for, not > on the binary format used by the OS (is that even a unique test? One can run > elf or coff on windows iirc) `addUsedOrCompilerUsedGlobal` is carefully used on `__attribute__((used))` and the related keep-static-consts.cpp. `__attribute__((used))` has a semantic split on ELF and non-ELF, so the difference is unavoidable. For other constructs we try to use the precise LLVMCompilerUsed or LLVMUsed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97446/new/ https://reviews.llvm.org/D97446 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits