[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 13 12:31:35 PDT 2023


jhuber6 added inline comments.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:2001
 
-void CodeGenModule::getDefaultFunctionAttributes(StringRef Name,
-                                                 bool HasOptnone,
-                                                 bool AttrOnCallSite,
-                                                 llvm::AttrBuilder &FuncAttrs) {
-  getTrivialDefaultFunctionAttributes(Name, HasOptnone, AttrOnCallSite,
-                                      FuncAttrs);
-  if (!AttrOnCallSite) {
-    // If we're just getting the default, get the default values for mergeable
-    // attributes.
-    addMergableDefaultFunctionAttributes(CodeGenOpts, FuncAttrs);
-  }
-}
+/// Adds attributes to \p F according to our \p CodeGenOpts and \p LangOpts, as
+/// though we had emitted it ourselves. We remove any attributes on F that
----------------
JonChesterfield wrote:
> I'm used to this sort of copy-some-args-and-not-others showing up in bug reports. Could this patch be re-ordered to make it apparent what functional changes are happening relative to the current head?
It's the same that will get added in in the `GetCPUAndFeaturesAttributes` function if you pass in a null declaration.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152391



More information about the cfe-commits mailing list