]> granicus.if.org Git - llvm/commitdiff
Merging r330189:
authorTom Stellard <tstellar@redhat.com>
Tue, 8 May 2018 20:21:46 +0000 (20:21 +0000)
committerTom Stellard <tstellar@redhat.com>
Tue, 8 May 2018 20:21:46 +0000 (20:21 +0000)
------------------------------------------------------------------------
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
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331804 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Core.cpp

index d3c33edec18678ed71afabbb48c58ea7cf935cd9..743e3710fd68217eb6053cdcfb0d36bee2993927 100644 (file)
@@ -359,11 +359,9 @@ LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty) {
   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, const char *Name) {
   unwrap(Val)->setName(Name);
 }
 
-LLVM_DUMP_METHOD void LLVMDumpValue(LLVMValueRef Val) {
+void LLVMDumpValue(LLVMValueRef Val) {
   unwrap(Val)->print(errs(), /*IsForDebug=*/true);
 }