[llvm] d8c3503 - [examples] fix ExceptionDemo
Stephen Neuendorffer via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 11 12:39:37 PDT 2020
Author: Stephen Neuendorffer
Date: 2020-07-11T12:38:27-07:00
New Revision: d8c35031a39e7b1bf9524ddd325c7a91dbb05f1d
URL: https://github.com/llvm/llvm-project/commit/d8c35031a39e7b1bf9524ddd325c7a91dbb05f1d
DIFF: https://github.com/llvm/llvm-project/commit/d8c35031a39e7b1bf9524ddd325c7a91dbb05f1d.diff
LOG: [examples] fix ExceptionDemo
Code didn't compile in a release build. Guard debug output with
ifndef NDEBUG.
Differential Revision: https://reviews.llvm.org/D83628
Added:
Modified:
llvm/examples/ExceptionDemo/ExceptionDemo.cpp
Removed:
################################################################################
diff --git a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
index 0ecb527f4ec0..1b3ec7c91dde 100644
--- a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -792,7 +792,7 @@ _Unwind_Reason_Code ourPersonality(int version, _Unwind_Action actions,
}
#endif
- const uint8_t *lsda = _Unwind_GetLanguageSpecificData(context);
+ const uint8_t *lsda = (const uint8_t *)_Unwind_GetLanguageSpecificData(context);
#ifdef DEBUG
fprintf(stderr,
@@ -1959,11 +1959,13 @@ int main(int argc, char *argv[]) {
executionEngine->finalizeObject();
+#ifndef NDEBUG
fprintf(stderr, "\nBegin module dump:\n\n");
module->dump();
fprintf(stderr, "\nEnd module dump:\n");
+#endif
fprintf(stderr, "\n\nBegin Test:\n");
More information about the llvm-commits
mailing list