summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2023-04-06 10:29:19 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2023-04-25 17:02:47 +0000
commitf2eef5f0e445f3dd439f91ee8db5fdfa2129b892 (patch)
tree519b828880ce20c98746c895e5994c1c882d20ca /compiler/optimizing/nodes.h
parentb5fcab944b3786f27ab6b698685109bfc7f785fd (diff)
Use `down_cast<>` in `HInstruction::As##type()`.
One overload used `down_cast<>` and the other used `static_cast<>`, so make it consistent. Also avoid some unnecessary `As##type()` calls and make some style adjustments. Test: m test-art-host-gtest Change-Id: I1f368a0c21647b44fffb7361dbb92d8a09fbe904
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index fc5d2196da..e562d7e901 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -8743,7 +8743,7 @@ inline bool IsZeroBitPattern(HInstruction* instruction) {
return Is##type() ? down_cast<const H##type*>(this) : nullptr; \
} \
inline H##type* HInstruction::As##type() { \
- return Is##type() ? static_cast<H##type*>(this) : nullptr; \
+ return Is##type() ? down_cast<H##type*>(this) : nullptr; \
}
FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CAST)