[all-commits] [llvm/llvm-project] 23b8a1: [DwarfDebug] Add forward declarations of "<" opera...

mikaelholmen via All-commits all-commits at lists.llvm.org
Fri Sep 29 00:22:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 23b8a19a1bce39d1e491e63d37b21ca8f6d2158f
      https://github.com/llvm/llvm-project/commit/23b8a19a1bce39d1e491e63d37b21ca8f6d2158f
  Author: Mikael Holmen <mikael.holmen at ericsson.com>
  Date:   2023-09-29 (Fri, 29 Sep 2023)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h

  Log Message:
  -----------
  [DwarfDebug] Add forward declarations of "<" operators [NFC]

The operators are defined in DwarfDebug.cpp but are
referenced in the struct definitions of FrameIndexExpr and
EntryValueInfo in DwarfDebug.h, and since they weren't
declared before, gcc warned with

 [694/5646] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DwarfDebug.cpp.o
 ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:273:6: warning: 'bool llvm::operator<(const llvm::FrameIndexExpr&, const llvm::FrameIndexExpr&)' has not been declared within 'llvm'
   273 | bool llvm::operator<(const FrameIndexExpr &LHS, const FrameIndexExpr &RHS) {
       |      ^~~~
 In file included from ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:13:
 ../lib/CodeGen/AsmPrinter/DwarfDebug.h:112:15: note: only here as a 'friend'
   112 |   friend bool operator<(const FrameIndexExpr &LHS, const FrameIndexExpr &RHS);
       |               ^~~~~~~~
 ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:278:6: warning: 'bool llvm::operator<(const llvm::EntryValueInfo&, const llvm::EntryValueInfo&)' has not been declared within 'llvm'
   278 | bool llvm::operator<(const EntryValueInfo &LHS, const EntryValueInfo &RHS) {
       |      ^~~~
 In file included from ../lib/CodeGen/AsmPrinter/DwarfDebug.cpp:13:
 ../lib/CodeGen/AsmPrinter/DwarfDebug.h:121:15: note: only here as a 'friend'
   121 |   friend bool operator<(const EntryValueInfo &LHS, const EntryValueInfo &RHS);
       |               ^~~~~~~~




More information about the All-commits mailing list