diff options
author | Tom Stellard <tstellar@redhat.com> | 2018-05-08 20:21:46 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2018-05-08 20:21:46 +0000 |
commit | d74441c80b53e17ebd027e4a9515707f6abc633c (patch) | |
tree | 9b84f2d09a1886805639520f2e3520716ede6089 | |
parent | c2239f5b46ef9c1cafa7b4aef3d023bca138ff0b (diff) | |
download | llvm-d74441c80b53e17ebd027e4a9515707f6abc633c.tar.gz |
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
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331804 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/IR/Core.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index d3c33edec186..743e3710fd68 100644 --- a/lib/IR/Core.cpp +++ b/lib/IR/Core.cpp @@ -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); } |