[PATCH] D44600: Fix LLVMDumpType() #ifdefed
Brenton Bostick via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 17 11:35:06 PDT 2018
brenton created this revision.
brenton added reviewers: MatzeB, sammccall.
Herald added a subscriber: llvm-commits.
Getting this error when using the LLVM C API and linking to a Release build
"Undefined symbols for architecture x86_64:
\"_LLVMDumpType\", referenced from:
_LLVMLink_LLVMDumpType_Wrapper in llvmc60.cpp.o
(maybe you meant: _LLVMLink_LLVMDumpType_Wrapper)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see \
invocation)
make[2]: *** [LLVMLink.dylib] Error 1
make[1]: *** [CMakeFiles/LLVMLink.dir/all] Error 2
make: *** [all] Error 2
"
This fixes 34633
https://bugs.llvm.org/show_bug.cgi?id=34633
Repository:
rL LLVM
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();
}
-#endif
char *LLVMPrintTypeToString(LLVMTypeRef Ty) {
std::string buf;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44600.138819.patch
Type: text/x-patch
Size: 415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180317/0023ac07/attachment.bin>
More information about the llvm-commits
mailing list