summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-07-29 18:33:07 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-07-29 18:33:07 +0000
commit36c51fc23f7d7330440ecf8de54e69bb68969c05 (patch)
tree1fc8e70f12d6f950812850569f60c2538ce52fa8
parent57a9c7d3bb01a82767a537a07aa2d6f99f958d15 (diff)
parent51d135f71a8aeb6409dc8ca91585c77f3d66dfc3 (diff)
Merge "Take into account that we might end up with unresolved classes."
-rw-r--r--compiler/optimizing/reference_type_propagation.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/optimizing/reference_type_propagation.cc b/compiler/optimizing/reference_type_propagation.cc
index f747fc516c..d1c1134565 100644
--- a/compiler/optimizing/reference_type_propagation.cc
+++ b/compiler/optimizing/reference_type_propagation.cc
@@ -440,8 +440,10 @@ void RTPVisitor::VisitLoadClass(HLoadClass* instr) {
Runtime::Current()->GetClassLinker()->FindDexCache(instr->GetDexFile());
// Get type from dex cache assuming it was populated by the verifier.
mirror::Class* resolved_class = dex_cache->GetResolvedType(instr->GetTypeIndex());
- DCHECK(resolved_class != nullptr);
- ReferenceTypeInfo::TypeHandle handle = handles_->NewHandle(resolved_class);
+ // TODO: investigating why we are still getting unresolved classes: b/22821472.
+ ReferenceTypeInfo::TypeHandle handle = (resolved_class != nullptr)
+ ? handles_->NewHandle(resolved_class)
+ : object_class_handle_;
instr->SetLoadedClassRTI(ReferenceTypeInfo::Create(handle, /* is_exact */ true));
instr->SetReferenceTypeInfo(ReferenceTypeInfo::Create(class_class_handle_, /* is_exact */ true));
}