Issue |
152243
|
Summary |
[mlir] Failed to compile MLIR
|
Labels |
mlir
|
Assignees |
|
Reporter |
linuxlonelyeagle
|
When I pulled the latest LLVM code to compile MLIR, I failed.`llvm/include/llvm/Support/DebugLog.h` It looks like it has been reverted.
```
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:71:12: error: ISO C++ forbids declaration of 'raw_ldbg_ostream' with no type [-fpermissive]
71 | explicit raw_ldbg_ostream(std::string Prefix, raw_ostream &Os,
| ^~~~~~~~~~~~~~~~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:71:3: error: only declarations of constructors and conversion operators can be 'explicit'
71 | explicit raw_ldbg_ostream(std::string Prefix, raw_ostream &Os,
| ^~~~~~~~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:77:20: error: expected class-name before '(' token
77 | ~raw_ldbg_ostream() final { flushEol(); }
| ^
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:90:3: error: 'raw_ldbg_ostream' does not name a type; did you mean 'raw_fd_ostream'?
90 | raw_ldbg_ostream &asLvalue() { return *this; }
| ^~~~~~~~~~~~~~~~
| raw_fd_ostream
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:86:12: error: 'uint64_t llvm::impl::LogWithNewline::current_pos() const' marked 'final', but is not virtual
86 | uint64_t current_pos() const final { return Os.tell(); }
| ^~~~~~~~~~~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h: In constructor 'llvm::impl::LogWithNewline::LogWithNewline(const char*, const char*, int, llvm::raw_ostream&)':
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:54:9: error: class 'llvm::impl::LogWithNewline' does not have any field named 'os'
54 | : os(os) {
| ^~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h: In destructor 'llvm::impl::LogWithNewline::~LogWithNewline()':
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:59:23: error: 'os' was not declared in this scope; did you mean 'cos'?
59 | ~LogWithNewline() { os << '\n'; }
| ^~
| cos
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h: In member function 'llvm::raw_ostream& llvm::impl::LogWithNewline::operator<<(const T&) &&':
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:61:12: error: 'os' was not declared in this scope; did you mean 'cos'?
61 | return os << t;
| ^~
| cos
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h: In member function 'int llvm::impl::LogWithNewline::raw_ldbg_ostream(std::string, llvm::raw_ostream&, bool)':
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:73:9: error: only constructors take member initializers
73 | : Prefix(std::move(Prefix)), Os(Os),
| ^~~~~~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:73:9: error: class 'llvm::impl::LogWithNewline' does not have any field named 'Prefix'
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:73:36: error: class 'llvm::impl::LogWithNewline' does not have any field named 'Os'
73 | : Prefix(std::move(Prefix)), Os(Os),
| ^~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:74:9: error: class 'llvm::impl::LogWithNewline' does not have any field named 'HasPendingNewline'
74 | HasPendingNewline(HasPendingNewline) {
| ^~~~~~~~~~~~~~~~~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:75:5: error: 'SetUnbuffered' was not declared in this scope; did you mean 'setbuffer'?
75 | SetUnbuffered();
| ^~~~~~~~~~~~~
| setbuffer
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:76:3: warning: no return statement in function returning non-void [-Wreturn-type]
76 | }
| ^
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h: In member function 'void llvm::impl::LogWithNewline::flushEol()':
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:79:9: error: 'HasPendingNewline' was not declared in this scope
79 | if (HasPendingNewline) {
| ^~~~~~~~~~~~~~~~~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:80:7: error: 'emitPrefix' was not declared in this scope
80 | emitPrefix();
| ^~~~~~~~~~
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h: In member function 'uint64_t llvm::impl::LogWithNewline::current_pos() const':
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:86:47: error: 'Os' was not declared in this scope
86 | uint64_t current_pos() const final { return Os.tell(); }
| ^~
/root/llvm-project/mlir/lib/IR/AsmPrinter.cpp: In function 'mlir::OpPrintingFlags verifyOpAndAdjustFlags(mlir::Operation*, mlir::OpPrintingFlags)':
/root/llvm-project/llvm/include/llvm/Support/DebugLog.h:42:19: error: '_GET_LDBG_MACRO' was not declared in this scope
42 | #define LDBG(...) _GET_LDBG_MACRO(__VA_ARGS__)(__VA_ARGS__)
| ^~~~~~~~~~~~~~~
/root/llvm-project/mlir/lib/IR/AsmPrinter.cpp:2073:5: note: in expansion of macro 'LDBG'
2073 | LDBG() << op->getName()
| ^~~~
/root/llvm-project/mlir/lib/IR/AsmPrinter.cpp: At global scope:
/root/llvm-project/mlir/lib/IR/AsmPrinter.cpp:2955:6: warning: 'virtual void mlir::AsmPrinter::printType(mlir::Type)' was hidden [-Woverloaded-virtual=]
2955 | void AsmPrinter::printType(Type type) {
| ^~~~~~~~~~
/root/llvm-project/mlir/lib/IR/AsmPrinter.cpp:2707:6: note: by 'mlir::AsmPrinter::Impl::printType(mlir::Type)'
2707 | void AsmPrinter::Impl::printType(Type type) {
| ^~~~~~~~~~
[2989/4533] Building CXX object tools/mlir/lib/IR/CMakeFiles/obj.MLIRIR.dir/BuiltinAttributes.cpp.o
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs