summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2023-09-29 17:42:02 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-09-29 17:42:02 +0000
commitdecb77b6251740ba51b514a03450e1a02aee7b05 (patch)
treebab3115fd046ffed2bf193558b8c4b8dcf6cb925
parent36086538e12529fdbb4c1beed3afe2b0efa92c3d (diff)
parentf8f33458f27f9403d11105dd57d434e3f23a3921 (diff)
downloadunwinding-decb77b6251740ba51b514a03450e1a02aee7b05.tar.gz
Update the unwinding code for C++20. am: 596e088ea0 am: f8f33458f2
Original change: https://android-review.googlesource.com/c/platform/system/unwinding/+/2760269 Change-Id: I184b38c11d291cf5733e83249f0fd45ec055b270 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libunwindstack/Android.bp1
-rw-r--r--libunwindstack/ElfInterfaceArm.h4
-rw-r--r--libunwindstack/include/unwindstack/DwarfSection.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp
index b5a4728..d2b02c6 100644
--- a/libunwindstack/Android.bp
+++ b/libunwindstack/Android.bp
@@ -39,6 +39,7 @@ cc_defaults {
"-Wall",
"-Werror",
"-Wextra",
+ "-Wno-deprecated-volatile",
// Disable this warning, it doesn't provide any useful data.
"-Wno-reorder-init-list"
],
diff --git a/libunwindstack/ElfInterfaceArm.h b/libunwindstack/ElfInterfaceArm.h
index d8cad48..b4db7da 100644
--- a/libunwindstack/ElfInterfaceArm.h
+++ b/libunwindstack/ElfInterfaceArm.h
@@ -46,8 +46,8 @@ class ElfInterfaceArm : public ElfInterface32 {
iterator& operator--() { index_--; return *this; }
iterator& operator--(int decrement) { index_ -= decrement; return *this; }
- bool operator==(const iterator& rhs) { return this->index_ == rhs.index_; }
- bool operator!=(const iterator& rhs) { return this->index_ != rhs.index_; }
+ bool operator==(const iterator& rhs) const { return this->index_ == rhs.index_; }
+ bool operator!=(const iterator& rhs) const { return this->index_ != rhs.index_; }
uint32_t operator*() {
uint32_t addr = interface_->addrs_[index_];
diff --git a/libunwindstack/include/unwindstack/DwarfSection.h b/libunwindstack/include/unwindstack/DwarfSection.h
index 2318f2f..75db6e4 100644
--- a/libunwindstack/include/unwindstack/DwarfSection.h
+++ b/libunwindstack/include/unwindstack/DwarfSection.h
@@ -73,8 +73,8 @@ class DwarfSection {
return *this;
}
- bool operator==(const iterator& rhs) { return this->index_ == rhs.index_; }
- bool operator!=(const iterator& rhs) { return this->index_ != rhs.index_; }
+ bool operator==(const iterator& rhs) const { return this->index_ == rhs.index_; }
+ bool operator!=(const iterator& rhs) const { return this->index_ != rhs.index_; }
const DwarfFde* operator*() {
if (index_ > fdes_.size()) return nullptr;