diff options
author | 2018-05-09 16:52:48 +0100 | |
---|---|---|
committer | 2018-05-09 16:57:43 +0100 | |
commit | 6d5b7e38fd5aba9eaad3a630b4859d214fa8f77c (patch) | |
tree | c6e9d055840bbc5a9b57de2128656d80f6ef7cd6 /compiler | |
parent | 48af3b39cd7c8abaa7f9671191ec8260630239b2 (diff) |
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
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/optimizing/nodes.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<BaseType, H##type>::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 { \ |