diff options
author | Derek Mauro <dmauro@google.com> | 2018-08-01T17·56-0400 |
---|---|---|
committer | Derek Mauro <dmauro@google.com> | 2018-08-01T17·56-0400 |
commit | b876d861b0a1dcc092e8b28a2fefa63dece84c33 (patch) | |
tree | 60471bb434ed4b71018b114104620b0350f9103c | |
parent | 5a85c65255c300a2affed941d495cf1d9a505f43 (diff) |
Tweak pull request #152 to fix multiple define problem with ppc64le.
-rw-r--r-- | absl/debugging/internal/stacktrace_powerpc-inl.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/absl/debugging/internal/stacktrace_powerpc-inl.inc b/absl/debugging/internal/stacktrace_powerpc-inl.inc index edf1947d38bf..860ac2b3e582 100644 --- a/absl/debugging/internal/stacktrace_powerpc-inl.inc +++ b/absl/debugging/internal/stacktrace_powerpc-inl.inc @@ -31,6 +31,8 @@ #include <cstdint> #include <cstdio> +#include "absl/base/attributes.h" +#include "absl/base/optimization.h" #include "absl/base/port.h" #include "absl/debugging/stacktrace.h" #include "absl/debugging/internal/address_is_readable.h" @@ -150,8 +152,9 @@ static void **NextStackFrame(void **old_sp, const void *uc) { } // This ensures that absl::GetStackTrace sets up the Link Register properly. -void AbslStacktracePowerPCDummyFunction() __attribute__((noinline)); -void AbslStacktracePowerPCDummyFunction() { __asm__ volatile(""); } +ABSL_ATTRIBUTE_NOINLINE static void AbslStacktracePowerPCDummyFunction() { + ABSL_BLOCK_TAIL_CALL_OPTIMIZATION(); +} template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT> ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. |