[llvm] r330189 - [LLVM-C] [PR34633] Avoid calling ->dump() methods from LLVMDump*.
whitequark via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 17 07:52:43 PDT 2018
Author: whitequark
Date: Tue Apr 17 07:52:43 2018
New Revision: 330189
URL: http://llvm.org/viewvc/llvm-project?rev=330189&view=rev
Log:
[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/trunk/lib/IR/Core.cpp
Modified: llvm/trunk/lib/IR/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Core.cpp?rev=330189&r1=330188&r2=330189&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Core.cpp (original)
+++ llvm/trunk/lib/IR/Core.cpp Tue Apr 17 07:52:43 2018
@@ -402,11 +402,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;
@@ -701,7 +699,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-commits
mailing list