summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2018-10-16 10:33:35 -0700
committerGravatar Xiaoyi Zhang <zhangxy988@gmail.com>2018-10-17 16:27:44 -0400
commit2019e17a520575ab365b2b5134d71068182c70b8 (patch)
tree3f82a3389308ed98ca9944221597fdc007391cab
parent5b70a8910b2e6fb0ce5193a41873139a126d2f7f (diff)
Export of internal Abseil changes.
-- 578b3ed641b8d92769a34d73389dfff5559925e6 by Abseil Team <absl-team@google.com>: Prevents tail call optimization for GetStackFrames[WithContext]/GetStackTrace[WithContext] functions, so the skipped frames will not change because of optimization difference. PiperOrigin-RevId: 217342437 -- 31fad1337e146a6ec74ae887d95920373e36c8dd by Abseil Team <absl-team@google.com>: Fixed syntax on flat_hash_set documentation for insert. PiperOrigin-RevId: 217208659 GitOrigin-RevId: 578b3ed641b8d92769a34d73389dfff5559925e6 Change-Id: I121c42861e8321ab561326978ac8972c68f066d0
-rw-r--r--absl/container/flat_hash_set.h2
-rw-r--r--absl/debugging/stacktrace.cc22
2 files changed, 12 insertions, 12 deletions
diff --git a/absl/container/flat_hash_set.h b/absl/container/flat_hash_set.h
index 98aead1a..04fa73f1 100644
--- a/absl/container/flat_hash_set.h
+++ b/absl/container/flat_hash_set.h
@@ -84,7 +84,7 @@ struct FlatHashSetPolicy;
// {"huey", "dewey", "louie"};
//
// // Insert a new element into the flat hash set
-// ducks.insert("donald"};
+// ducks.insert("donald");
//
// // Force a rehash of the flat hash set
// ducks.rehash(0);
diff --git a/absl/debugging/stacktrace.cc b/absl/debugging/stacktrace.cc
index 463fad26..7bbd65ac 100644
--- a/absl/debugging/stacktrace.cc
+++ b/absl/debugging/stacktrace.cc
@@ -80,29 +80,29 @@ ABSL_ATTRIBUTE_ALWAYS_INLINE inline int Unwind(void** result, int* sizes,
} // anonymous namespace
-ABSL_ATTRIBUTE_NOINLINE
-int GetStackFrames(void** result, int* sizes, int max_depth, int skip_count) {
+ABSL_ATTRIBUTE_NOINLINE ABSL_ATTRIBUTE_NO_TAIL_CALL int GetStackFrames(
+ void** result, int* sizes, int max_depth, int skip_count) {
return Unwind<true, false>(result, sizes, max_depth, skip_count, nullptr,
nullptr);
}
-ABSL_ATTRIBUTE_NOINLINE
-int GetStackFramesWithContext(void** result, int* sizes, int max_depth,
- int skip_count, const void* uc,
- int* min_dropped_frames) {
+ABSL_ATTRIBUTE_NOINLINE ABSL_ATTRIBUTE_NO_TAIL_CALL int
+GetStackFramesWithContext(void** result, int* sizes, int max_depth,
+ int skip_count, const void* uc,
+ int* min_dropped_frames) {
return Unwind<true, true>(result, sizes, max_depth, skip_count, uc,
min_dropped_frames);
}
-ABSL_ATTRIBUTE_NOINLINE
-int GetStackTrace(void** result, int max_depth, int skip_count) {
+ABSL_ATTRIBUTE_NOINLINE ABSL_ATTRIBUTE_NO_TAIL_CALL int GetStackTrace(
+ void** result, int max_depth, int skip_count) {
return Unwind<false, false>(result, nullptr, max_depth, skip_count, nullptr,
nullptr);
}
-ABSL_ATTRIBUTE_NOINLINE
-int GetStackTraceWithContext(void** result, int max_depth, int skip_count,
- const void* uc, int* min_dropped_frames) {
+ABSL_ATTRIBUTE_NOINLINE ABSL_ATTRIBUTE_NO_TAIL_CALL int
+GetStackTraceWithContext(void** result, int max_depth, int skip_count,
+ const void* uc, int* min_dropped_frames) {
return Unwind<false, true>(result, nullptr, max_depth, skip_count, uc,
min_dropped_frames);
}