[PATCH] D51199: CodeGen: Add two more conditions for adding symbols to the address-significance table.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 24 12:56:37 PDT 2018


rnk added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1546
+      if (!GV.use_empty() && !GV.isThreadLocal() &&
+          !GV.hasDLLImportStorageClass() && !GV.getName().startswith("llvm.") &&
           !GV.hasAtLeastLocalUnnamedAddr())
----------------
Dllimport things aren't actually always imported, sometimes they can be resolved to symbols in the same image. MSVC will warn for this by default, but in my experience developers disable the warning, especially if they don't use Windows for development.

Can we end up with an incomplete table if we apply dllimport, resolve the symbol locally, and take the symbols address in that TU?


Repository:
  rL LLVM

https://reviews.llvm.org/D51199





More information about the llvm-commits mailing list