summarylogtreecommitdiffstats
path: root/add-clang-nomerge-attribute-to-CheckError.patch
diff options
context:
space:
mode:
Diffstat (limited to 'add-clang-nomerge-attribute-to-CheckError.patch')
-rw-r--r--add-clang-nomerge-attribute-to-CheckError.patch32
1 files changed, 7 insertions, 25 deletions
diff --git a/add-clang-nomerge-attribute-to-CheckError.patch b/add-clang-nomerge-attribute-to-CheckError.patch
index 5dc0834dea92..4154df66c6b9 100644
--- a/add-clang-nomerge-attribute-to-CheckError.patch
+++ b/add-clang-nomerge-attribute-to-CheckError.patch
@@ -1,4 +1,4 @@
-From 209bf5cdfc095516ba9e391dd52ce16a74114ae6 Mon Sep 17 00:00:00 2001
+From 9909f146b28d56c9c0411329a056ed959b33f76a Mon Sep 17 00:00:00 2001
From: Zequan Wu <zequanwu@google.com>
Date: Wed, 10 Feb 2021 03:26:00 +0000
Subject: [PATCH] Reland "Add [[clang::nomerge]] attribute to ~CheckError()."
@@ -25,16 +25,14 @@ Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Zequan Wu <zequanwu@google.com>
Cr-Commit-Position: refs/heads/master@{#852453}
-GitOrigin-RevId: 9909f146b28d56c9c0411329a056ed959b33f76a
---
- check.h | 2 +-
- compiler_specific.h | 7 +++++++
- 2 files changed, 8 insertions(+), 1 deletion(-)
+ base/check.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
-diff --git a/check.h b/check.h
-index c94ab68db..17048e455 100644
---- a/check.h
-+++ b/check.h
+diff --git a/base/check.h b/base/check.h
+index c94ab68db90..17048e45539 100644
+--- a/base/check.h
++++ b/base/check.h
@@ -85,7 +85,7 @@ class BASE_EXPORT CheckError {
// Stream for adding optional details to the error message.
std::ostream& stream();
@@ -44,19 +42,3 @@ index c94ab68db..17048e455 100644
CheckError(const CheckError& other) = delete;
CheckError& operator=(const CheckError& other) = delete;
-diff --git a/compiler_specific.h b/compiler_specific.h
-index fa961b0ce..14a5d6870 100644
---- a/compiler_specific.h
-+++ b/compiler_specific.h
-@@ -332,4 +332,11 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) {
-
- #endif // defined(__clang_analyzer__)
-
-+// Use nomerge attribute to disable optimization of merging multiple same calls.
-+#if defined(__clang__) && __has_attribute(nomerge) && !defined(OS_CHROMEOS)
-+#define NOMERGE [[clang::nomerge]]
-+#else
-+#define NOMERGE
-+#endif
-+
- #endif // BASE_COMPILER_SPECIFIC_H_