<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/152243>152243</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [mlir] Failed to compile MLIR
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          linuxlonelyeagle
      </td>
    </tr>
</table>

<pre>
    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
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.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