From 6d5b7e38fd5aba9eaad3a630b4859d214fa8f77c Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 9 May 2018 16:52:48 +0100 Subject: ART: Clean up after HInstruction::Is##type() rewrite. Address late comments on https://android-review.googlesource.com/679021 . Test: Rely on TreeHugger. Change-Id: Id82976651aced36b8ee2808b6a9effbfb3224d42 --- compiler/optimizing/nodes.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index ae1e6065cd..9dcd741388 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -7747,11 +7747,13 @@ inline bool IsZeroBitPattern(HInstruction* instruction) { return instruction->IsConstant() && instruction->AsConstant()->IsZeroBitPattern(); } +// Implement HInstruction::Is##type() for concrete instructions. #define INSTRUCTION_TYPE_CHECK(type, super) \ inline bool HInstruction::Is##type() const { return GetKind() == k##type; } FOR_EACH_CONCRETE_INSTRUCTION(INSTRUCTION_TYPE_CHECK) #undef INSTRUCTION_TYPE_CHECK +// Implement HInstruction::Is##type() for abstract instructions. #define INSTRUCTION_TYPE_CHECK_RESULT(type, super) \ std::is_base_of::value, #define INSTRUCTION_TYPE_CHECK(type, super) \ @@ -7766,7 +7768,7 @@ inline bool IsZeroBitPattern(HInstruction* instruction) { FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK) #undef INSTRUCTION_TYPE_CHECK -#undef INSTRUCTION_TYPE_CHECK_CASE +#undef INSTRUCTION_TYPE_CHECK_RESULT #define INSTRUCTION_TYPE_CAST(type, super) \ inline const H##type* HInstruction::As##type() const { \ -- cgit v1.2.3-59-g8ed1b