summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2014-11-12 10:24:10 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-11-12 10:24:10 +0000
commit93ca91d05bb5a08bb883f72bf8551275ace3181f (patch)
tree7b1f2cd2aaef7da78628885d106e344915d73ae2 /compiler/optimizing/nodes.h
parentf2d99e1bd4fe21b39a8ee6ac3cdc5e23db82d023 (diff)
parent421e9f9088b51e9680a3dfcae6965fc1854d3ee4 (diff)
Merge "Remove HTemporary when building the SSA graph."
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index a3b9cb163c..0c75e41fc4 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -2115,7 +2115,11 @@ class HTemporary : public HTemplateInstruction<0> {
size_t GetIndex() const { return index_; }
- Primitive::Type GetType() const OVERRIDE { return GetPrevious()->GetType(); }
+ Primitive::Type GetType() const OVERRIDE {
+ // The previous instruction is the one that will be stored in the temporary location.
+ DCHECK(GetPrevious() != nullptr);
+ return GetPrevious()->GetType();
+ }
DECLARE_INSTRUCTION(Temporary);