[PATCH] D44600: Fix LLVMDumpType() #ifdefed

Brenton Bostick via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 17 07:51:28 PDT 2018


brenton updated this revision to Diff 142778.
brenton added a comment.

Only remove LLVM_DUMP_METHOD from C API functions


https://reviews.llvm.org/D44600

Files:
  lib/IR/Core.cpp


Index: lib/IR/Core.cpp
===================================================================
--- lib/IR/Core.cpp
+++ lib/IR/Core.cpp
@@ -359,11 +359,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;
@@ -658,7 +656,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.142778.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180417/1337a5ce/attachment.bin>


More information about the llvm-commits mailing list