summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils-inl.h
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2018-11-16 14:21:47 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-11-16 14:21:47 +0000
commit54c7da9c50ee85ade636605cd6ea18b4c2bc69fa (patch)
tree57e1a23dcc0beba8e98841b8cf063f6153b08c9b /runtime/entrypoints/entrypoint_utils-inl.h
parentd94653399e2f9f06bbdf629f2affbf9a4fa73b8f (diff)
parent2bb2fbd2879d0a6d9ebf7acff817079dde89b417 (diff)
Merge changes Idc6e518c,Ia1cc0506
* changes: Create SdkVersion enum, migrate users to it Runtime flags only for fast/slow hiddenapi path
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils-inl.h')
-rw-r--r--runtime/entrypoints/entrypoint_utils-inl.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index 0b005e0851..2236e61d75 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -22,6 +22,7 @@
#include "art_field-inl.h"
#include "art_method-inl.h"
#include "base/enums.h"
+#include "base/sdk_version.h"
#include "class_linker-inl.h"
#include "common_throws.h"
#include "dex/dex_file.h"
@@ -94,8 +95,9 @@ inline ArtMethod* GetResolvedMethod(ArtMethod* outer_method,
// even going back from boot image methods to the same oat file. However, this is
// not currently implemented in the compiler. Therefore crossing dex file boundary
// indicates that the inlined definition is not the same as the one used at runtime.
- bool target_sdk_pre_p = Runtime::Current()->GetTargetSdkVersion() < 28;
- LOG(target_sdk_pre_p ? WARNING : FATAL)
+ bool target_sdk_at_least_p =
+ IsSdkVersionSetAndAtLeast(Runtime::Current()->GetTargetSdkVersion(), SdkVersion::kP);
+ LOG(target_sdk_at_least_p ? FATAL : WARNING)
<< "Inlined method resolution crossed dex file boundary: from "
<< method->PrettyMethod()
<< " in " << method->GetDexFile()->GetLocation() << "/"