This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG60dcc70e48fa: [clang][Interp] Only generate disassembly in 
debug builds (authored by tbaeder).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142694/new/

https://reviews.llvm.org/D142694

Files:
  clang/lib/AST/Interp/Disasm.cpp
  clang/utils/TableGen/ClangOpcodesEmitter.cpp


Index: clang/utils/TableGen/ClangOpcodesEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangOpcodesEmitter.cpp
+++ clang/utils/TableGen/ClangOpcodesEmitter.cpp
@@ -161,6 +161,7 @@
 }
 
 void ClangOpcodesEmitter::EmitDisasm(raw_ostream &OS, StringRef N, Record *R) {
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   OS << "#ifdef GET_DISASM\n";
   Enumerate(R, N, [R, &OS](ArrayRef<Record *>, const Twine &ID) {
     OS << "case OP_" << ID << ":\n";
@@ -176,6 +177,7 @@
     OS << "  continue;\n";
   });
   OS << "#endif\n";
+#endif
 }
 
 void ClangOpcodesEmitter::EmitEmitter(raw_ostream &OS, StringRef N, Record *R) 
{
Index: clang/lib/AST/Interp/Disasm.cpp
===================================================================
--- clang/lib/AST/Interp/Disasm.cpp
+++ clang/lib/AST/Interp/Disasm.cpp
@@ -34,6 +34,7 @@
 LLVM_DUMP_METHOD void Function::dump() const { dump(llvm::errs()); }
 
 LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS) const {
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   if (F) {
     if (const auto *MD = dyn_cast<CXXMethodDecl>(F))
       OS << MD->getParent()->getDeclName() << "::";
@@ -64,6 +65,7 @@
 #undef GET_DISASM
     }
   }
+#endif
 }
 
 LLVM_DUMP_METHOD void Program::dump() const { dump(llvm::errs()); }


Index: clang/utils/TableGen/ClangOpcodesEmitter.cpp
===================================================================
--- clang/utils/TableGen/ClangOpcodesEmitter.cpp
+++ clang/utils/TableGen/ClangOpcodesEmitter.cpp
@@ -161,6 +161,7 @@
 }
 
 void ClangOpcodesEmitter::EmitDisasm(raw_ostream &OS, StringRef N, Record *R) {
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   OS << "#ifdef GET_DISASM\n";
   Enumerate(R, N, [R, &OS](ArrayRef<Record *>, const Twine &ID) {
     OS << "case OP_" << ID << ":\n";
@@ -176,6 +177,7 @@
     OS << "  continue;\n";
   });
   OS << "#endif\n";
+#endif
 }
 
 void ClangOpcodesEmitter::EmitEmitter(raw_ostream &OS, StringRef N, Record *R) {
Index: clang/lib/AST/Interp/Disasm.cpp
===================================================================
--- clang/lib/AST/Interp/Disasm.cpp
+++ clang/lib/AST/Interp/Disasm.cpp
@@ -34,6 +34,7 @@
 LLVM_DUMP_METHOD void Function::dump() const { dump(llvm::errs()); }
 
 LLVM_DUMP_METHOD void Function::dump(llvm::raw_ostream &OS) const {
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   if (F) {
     if (const auto *MD = dyn_cast<CXXMethodDecl>(F))
       OS << MD->getParent()->getDeclName() << "::";
@@ -64,6 +65,7 @@
 #undef GET_DISASM
     }
   }
+#endif
 }
 
 LLVM_DUMP_METHOD void Program::dump() const { dump(llvm::errs()); }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to