[llvm-branch-commits] [llvm-branch] r331804 - Merging r330189:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 8 13:21:46 PDT 2018


Author: tstellar
Date: Tue May  8 13:21:46 2018
New Revision: 331804

URL: http://llvm.org/viewvc/llvm-project?rev=331804&view=rev
Log:
Merging r330189:

------------------------------------------------------------------------
r330189 | whitequark | 2018-04-17 07:52:43 -0700 (Tue, 17 Apr 2018) | 7 lines

[LLVM-C] [PR34633] Avoid calling ->dump() methods from LLVMDump*.

LLVMDump* functions are available in Release builds too.

Patch by Brenton Bostick.

Differential Revision: https://reviews.llvm.org/D44600
------------------------------------------------------------------------

Modified:
    llvm/branches/release_60/lib/IR/Core.cpp

Modified: llvm/branches/release_60/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_60/lib/IR/Core.cpp?rev=331804&r1=331803&r2=331804&view=diff
==============================================================================
--- llvm/branches/release_60/lib/IR/Core.cpp (original)
+++ llvm/branches/release_60/lib/IR/Core.cpp Tue May  8 13:21:46 2018
@@ -359,11 +359,9 @@ LLVMContextRef LLVMGetTypeContext(LLVMTy
   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 @@ void LLVMSetValueName(LLVMValueRef Val,
   unwrap(Val)->setName(Name);
 }
 
-LLVM_DUMP_METHOD void LLVMDumpValue(LLVMValueRef Val) {
+void LLVMDumpValue(LLVMValueRef Val) {
   unwrap(Val)->print(errs(), /*IsForDebug=*/true);
 }
 




More information about the llvm-branch-commits mailing list