[all-commits] [llvm/llvm-project] d49bc5: [llvm][MemProf] Correct position of LLVM_ABI macro...

David Spickett via All-commits all-commits at lists.llvm.org
Thu Jun 12 06:17:54 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d49bc5e621c8931679b232fa28abfc89a171105e
      https://github.com/llvm/llvm-project/commit/d49bc5e621c8931679b232fa28abfc89a171105e
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2025-06-12 (Thu, 12 Jun 2025)

  Changed paths:
    M llvm/lib/ProfileData/MemProfRadixTree.cpp

  Log Message:
  -----------
  [llvm][MemProf] Correct position of LLVM_ABI macro in computeFrameHistogram

The previous placement resulted in this warning when using g++-13:
/home/david.spickett/llvm-project/llvm/include/llvm/Support/Compiler.h:120:43: warning: attribute ignored [-Wattributes]
  120 | #define LLVM_ATTRIBUTE_VISIBILITY_DEFAULT [[gnu::visibility("default")]]
      |                                           ^
/home/david.spickett/llvm-project/llvm/include/llvm/Support/Compiler.h:213:18: note: in expansion of macro ‘LLVM_ATTRIBUTE_VISIBILITY_DEFAULT’
  213 | #define LLVM_ABI LLVM_ATTRIBUTE_VISIBILITY_DEFAULT
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/david.spickett/llvm-project/llvm/lib/ProfileData/MemProfRadixTree.cpp:245:5: note: in expansion of macro ‘LLVM_ABI’
  245 |     LLVM_ABI computeFrameHistogram<FrameId>(
      |     ^~~~~~~~
/home/david.spickett/llvm-project/llvm/include/llvm/Support/Compiler.h:120:43: note: an attribute that appertains to a type-specifier is ignored
  120 | #define LLVM_ATTRIBUTE_VISIBILITY_DEFAULT [[gnu::visibility("default")]]
      |                                           ^

According to the interface guide, that macro should go before the return
type to be effective.

https://llvm.org/docs/InterfaceExportAnnotations.html#specialized-template-functions



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list