Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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); | ^~~~~~~~
- Loading branch information