diff options
author | 2023-02-20 14:26:23 +0000 | |
---|---|---|
committer | 2023-02-22 11:47:48 +0000 | |
commit | e05bc3e1d03e8cba0c16a1b738591a2e972235b6 (patch) | |
tree | c5c8e4342b31ad445c0c80cf08cf671dc598e33e /compiler/optimizing/nodes.h | |
parent | 452605be671e499ae2c535f7c7a37587551dc65a (diff) |
Set more RTI only if they are valid
Follow-up to aosp/2442280. We haven't seen crashes with these ones,
but we can't guarantee that the RTI will be valid in these code paths.
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: I80da85a6549ba0275a80027016363e0cf9fb8045
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 58ce9cec70..5854fa2fa5 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2377,7 +2377,10 @@ class HInstruction : public ArenaObject<kArenaAllocInstruction> { return GetType() == DataType::Type::kReference; } + // Sets the ReferenceTypeInfo. The RTI must be valid. void SetReferenceTypeInfo(ReferenceTypeInfo rti); + // Same as above, but we only set it if it's valid. Otherwise, we don't change the current RTI. + void SetReferenceTypeInfoIfValid(ReferenceTypeInfo rti); ReferenceTypeInfo GetReferenceTypeInfo() const { DCHECK_EQ(GetType(), DataType::Type::kReference); |