[PATCH] D104058: ThinLTO: Fix inline assembly references to static functions with CFI

Sami Tolvanen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 30 11:21:03 PDT 2021


samitolvanen added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:39
+  // Promotion aliases are used only in inline assembly. It's safe to
+  // simply skip unusual names. Matches MCAsmInfo::isAcceptableChar().
+  for (const char &C : Name) {
----------------
nickdesaulniers wrote:
> What about `MCAsmInfoXCOFF::isAcceptableChar`?  I guess we could be targeting a XCOFF object file format with LTO?
Sure, I'll drop '$' and '@' from the list to play nice with XCOFF. 


================
Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:45
+  }
+  return true;
+}
----------------
nickdesaulniers wrote:
> Can llvm::any_of or llvm::none_of be used here?
> llvm/ADT/STLExtras.h
Maybe, but I don't see how they would make this function any cleaner. Did you have something specific in mind?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104058



More information about the cfe-commits mailing list