[PATCH] D40278: Object: Improve COFF irsymtab comdat representation.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 20:22:35 PST 2017


rnk accepted this revision.
rnk added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Object/IRSymtab.cpp:160
+    llvm::raw_string_ostream OS(Name);
+    Mangler::getNameWithPrefix(OS, C->getName(), M->getDataLayout());
+
----------------
Every time I see getNameWithPrefix called without a GlobalValue, I consider it a bit buggy because it won't add the @N byte suffix for __stdcall functions. However, clang always mangles extern "C" names itself for functions with non-standard conventions, so there's no way to exercise this bug from C, it has to come from LLVM IR.

Do we care? Should we fatal error in AsmPrinter when a symbol in a comdat would require a suffix? Most languages that aren't C++ aren't going to care about this.


https://reviews.llvm.org/D40278





More information about the llvm-commits mailing list