summaryrefslogtreecommitdiffstats
path: root/libunwind
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-01-25 02:27:45 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-01-25 02:27:45 +0000
commit9a75332cab42fe7f62306b230bdd01c142c94ec7 (patch)
tree4da5c0158e0146d084234972e2795601f6aed3b0 /libunwind
parent17db7704cd10243be74cec3512a9ccf734631297 (diff)
downloadbcm5719-llvm-9a75332cab42fe7f62306b230bdd01c142c94ec7.tar.gz
bcm5719-llvm-9a75332cab42fe7f62306b230bdd01c142c94ec7.zip
DWARF: fix -Asserts builds
no-op the DWARF tracing macros in non-debug builds. llvm-svn: 293008
Diffstat (limited to 'libunwind')
-rw-r--r--libunwind/src/DwarfParser.hpp9
-rw-r--r--libunwind/src/config.h9
2 files changed, 10 insertions, 8 deletions
diff --git a/libunwind/src/DwarfParser.hpp b/libunwind/src/DwarfParser.hpp
index f4e5d487f4c..610a3aeb0ef 100644
--- a/libunwind/src/DwarfParser.hpp
+++ b/libunwind/src/DwarfParser.hpp
@@ -22,14 +22,7 @@
#include "dwarf2.h"
#include "AddressSpace.hpp"
-
-extern "C" bool logDWARF();
-
-#define _LIBUNWIND_TRACE_DWARF(...) \
- do { \
- if (logDWARF()) \
- fprintf(stderr, __VA_ARGS__); \
- } while (0)
+#include "config.h"
namespace libunwind {
diff --git a/libunwind/src/config.h b/libunwind/src/config.h
index fefb44e0a23..55c32825fe4 100644
--- a/libunwind/src/config.h
+++ b/libunwind/src/config.h
@@ -110,13 +110,16 @@
#define _LIBUNWIND_DEBUG_LOG(msg, ...)
#define _LIBUNWIND_TRACE_API(msg, ...)
#define _LIBUNWIND_TRACING_UNWINDING (0)
+ #define _LIBUNWIND_TRACING_DWARF (0)
#define _LIBUNWIND_TRACE_UNWINDING(msg, ...)
+ #define _LIBUNWIND_TRACE_DWARF(...)
#else
#ifdef __cplusplus
extern "C" {
#endif
extern bool logAPIs();
extern bool logUnwinding();
+ extern bool logDWARF();
#ifdef __cplusplus
}
#endif
@@ -127,11 +130,17 @@
_LIBUNWIND_LOG(msg, __VA_ARGS__); \
} while (0)
#define _LIBUNWIND_TRACING_UNWINDING logUnwinding()
+ #define _LIBUNWIND_TRACING_DWARF logDWARF()
#define _LIBUNWIND_TRACE_UNWINDING(msg, ...) \
do { \
if (logUnwinding()) \
_LIBUNWIND_LOG(msg, __VA_ARGS__); \
} while (0)
+ #define _LIBUNWIND_TRACE_DWARF(...) \
+ do { \
+ if (logDWARF()) \
+ fprintf(stderr, __VA_ARGS__); \
+ } while (0)
#endif
#ifdef __cplusplus
OpenPOWER on IntegriCloud