[PATCH] D44600: Fix LLVMDumpType() #ifdefed

whitequark via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 17 07:56:04 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL330189: [LLVM-C] [PR34633] Avoid calling ->dump() methods from LLVMDump*. (authored by whitequark, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D44600?vs=142778&id=142779#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D44600

Files:
  llvm/trunk/lib/IR/Core.cpp


Index: llvm/trunk/lib/IR/Core.cpp
===================================================================
--- llvm/trunk/lib/IR/Core.cpp
+++ llvm/trunk/lib/IR/Core.cpp
@@ -402,11 +402,9 @@
   return wrap(&unwrap(Ty)->getContext());
 }
 
-#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) {
-  return unwrap(Ty)->dump();
+void LLVMDumpType(LLVMTypeRef Ty) {
+  return unwrap(Ty)->print(errs(), /*IsForDebug=*/true);
 }
-#endif
 
 char *LLVMPrintTypeToString(LLVMTypeRef Ty) {
   std::string buf;
@@ -701,7 +699,7 @@
   unwrap(Val)->setName(Name);
 }
 
-LLVM_DUMP_METHOD void LLVMDumpValue(LLVMValueRef Val) {
+void LLVMDumpValue(LLVMValueRef Val) {
   unwrap(Val)->print(errs(), /*IsForDebug=*/true);
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44600.142779.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180417/979c42a8/attachment.bin>


More information about the llvm-commits mailing list