summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-03-26 10:45:51 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-03-26 10:45:52 +0000
commitc8924c6ea9e83ba3832dd5551df38ab06f4aaca9 (patch)
tree94d7d6016c5a58d6c5f31d8350330c8025baa014 /compiler/optimizing/inliner.cc
parent9ed05c4cf76aaeee48a1eb5bbae659b0acbabe67 (diff)
parent790412959a6413a585f45fc5f77fe7106311a00c (diff)
Merge "Use the original invoke type when inlining."
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 256e85b6ce..4b990f1ddd 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -50,7 +50,9 @@ void HInliner::Run() {
HInstruction* next = instruction->GetNext();
HInvokeStaticOrDirect* call = instruction->AsInvokeStaticOrDirect();
if (call != nullptr) {
- if (!TryInline(call, call->GetDexMethodIndex(), call->GetInvokeType())) {
+ // We use the original invoke type to ensure the resolution of the called method
+ // works properly.
+ if (!TryInline(call, call->GetDexMethodIndex(), call->GetOriginalInvokeType())) {
if (kIsDebugBuild) {
std::string callee_name =
PrettyMethod(call->GetDexMethodIndex(), *outer_compilation_unit_.GetDexFile());