summaryrefslogtreecommitdiff
path: root/runtime/class_table.cc
diff options
context:
space:
mode:
author Pirama Arumuga Nainar <pirama@google.com> 2016-08-25 23:42:50 -0700
committer Pirama Arumuga Nainar <pirama@google.com> 2016-08-26 21:06:35 +0000
commit813b9c47d8952b3f02a6032d79d66433c981d030 (patch)
tree751538e01323ac58c1b2b2f7c5a743771b78b558 /runtime/class_table.cc
parentb857c3bfb92297996a8c0e97acdf29654e665342 (diff)
Ignore -Wunreachable-code for ClassTable::UpdateClass
Bug: http://b/30421084 Bug: http://b/31104323 Clang triggers -Wunreachable-code in runtime/class_table.cc. Disable the one instance of this warning until we can investigate (and fix) the Clang regression. Change-Id: Ib292009c6d639f540d6b31e793d8aa89dd861b9e Test: Tested build, boot and common usage for several devices images in AOSP and internal branch.
Diffstat (limited to 'runtime/class_table.cc')
-rw-r--r--runtime/class_table.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/class_table.cc b/runtime/class_table.cc
index e9154cb400..55ff73d0a6 100644
--- a/runtime/class_table.cc
+++ b/runtime/class_table.cc
@@ -53,6 +53,10 @@ mirror::Class* ClassTable::LookupByDescriptor(mirror::Class* klass) {
return nullptr;
}
+// Bug: http://b/31104323 Ignore -Wunreachable-code from the for loop below
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunreachable-code"
+
mirror::Class* ClassTable::UpdateClass(const char* descriptor, mirror::Class* klass, size_t hash) {
WriterMutexLock mu(Thread::Current(), lock_);
// Should only be updating latest table.
@@ -77,6 +81,8 @@ mirror::Class* ClassTable::UpdateClass(const char* descriptor, mirror::Class* kl
return existing;
}
+#pragma clang diagnostic pop // http://b/31104323
+
size_t ClassTable::NumZygoteClasses() const {
ReaderMutexLock mu(Thread::Current(), lock_);
size_t sum = 0;