summaryrefslogtreecommitdiff
path: root/absl
diff options
context:
space:
mode:
authorGravatar Derek Mauro <761129+derekmauro@users.noreply.github.com>2018-08-01 14:37:53 -0400
committerGravatar GitHub <noreply@github.com>2018-08-01 14:37:53 -0400
commit92e07e5590752d6b8e67f7f2f86c6286561e8cea (patch)
treebbe4990ecbc8df4fdd24f21f4a207dad99138854 /absl
parent2125e6444a9de9e41f21ecdc674dd7d8759c149d (diff)
parentb876d861b0a1dcc092e8b28a2fefa63dece84c33 (diff)
Merge pull request #152 from clnperez/fix-multi-defines-ppc64le
fix multiple define problem with ppc64le
Diffstat (limited to 'absl')
-rw-r--r--absl/debugging/internal/stacktrace_powerpc-inl.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/absl/debugging/internal/stacktrace_powerpc-inl.inc b/absl/debugging/internal/stacktrace_powerpc-inl.inc
index 297bdadf..860ac2b3 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 StacktracePowerPCDummyFunction() __attribute__((noinline));
-void StacktracePowerPCDummyFunction() { __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.
@@ -176,7 +179,7 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
// want here. While the compiler will always(?) set up LR for
// subroutine calls, it may not for leaf functions (such as this one).
// This routine forces the compiler (at least gcc) to push it anyway.
- StacktracePowerPCDummyFunction();
+ AbslStacktracePowerPCDummyFunction();
// The LR save area is used by the callee, so the top entry is bogus.
skip_count++;