summaryrefslogtreecommitdiff
path: root/compiler/optimizing/instruction_simplifier.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-10-06 12:48:56 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-10-06 12:48:56 +0000
commit3b6b587934659bc4428557ac174ccce3731fd91a (patch)
tree4ef321e302c80d5be3e132650dc592ee16f58958 /compiler/optimizing/instruction_simplifier.cc
parentf82baa912a4c05a39f953826a45c0617dd2e78ff (diff)
parent98893e146b0ff0e1fd1d7c29252f1d1e75a163f2 (diff)
Merge "Add support for unresolved classes in optimizing."
Diffstat (limited to 'compiler/optimizing/instruction_simplifier.cc')
-rw-r--r--compiler/optimizing/instruction_simplifier.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc
index 3287a0a119..86a3ad98b4 100644
--- a/compiler/optimizing/instruction_simplifier.cc
+++ b/compiler/optimizing/instruction_simplifier.cc
@@ -216,7 +216,11 @@ static bool TypeCheckHasKnownOutcome(HLoadClass* klass, HInstruction* object, bo
}
ReferenceTypeInfo class_rti = klass->GetLoadedClassRTI();
- DCHECK(class_rti.IsValid() && class_rti.IsExact());
+ if (!class_rti.IsValid()) {
+ // Happens when the loaded class is unresolved.
+ return false;
+ }
+ DCHECK(class_rti.IsExact());
if (class_rti.IsSupertypeOf(obj_rti)) {
*outcome = true;
return true;