diff options
author | Dan Gohman <sunfish@google.com> | 2014-02-12 17:51:14 -0800 |
---|---|---|
committer | Dan Gohman <sunfish@google.com> | 2014-02-12 18:16:37 -0800 |
commit | ea29e0f4b1d86e6f32c4faac8e362a3632a97be7 (patch) | |
tree | 73d825aa42ed66a5d3014072b4e9b773c7e1ed1e | |
parent | 59147c7295d0698b440f455e9080acc67aa80bff (diff) |
Change some dyn_casts to casts.
-rw-r--r-- | lib/Target/JSBackend/JSBackend.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp index bef17bd545..1b01f80e0f 100644 --- a/lib/Target/JSBackend/JSBackend.cpp +++ b/lib/Target/JSBackend/JSBackend.cpp @@ -1977,9 +1977,9 @@ void JSWriter::parseConstant(const std::string& name, const Constant* CV, bool c if (CE->getOpcode() == Instruction::PtrToInt) { Data = getConstAsOffset(V, Absolute + Offset - OffsetStart); } else if (CE->getOpcode() == Instruction::Add) { - V = dyn_cast<ConstantExpr>(V)->getOperand(0); + V = cast<ConstantExpr>(V)->getOperand(0); Data = getConstAsOffset(V, Absolute + Offset - OffsetStart); - ConstantInt *CI = dyn_cast<ConstantInt>(CE->getOperand(1)); + ConstantInt *CI = cast<ConstantInt>(CE->getOperand(1)); Data += *CI->getValue().getRawData(); } else { dumpIR(CE); @@ -2029,7 +2029,7 @@ void JSWriter::parseConstant(const std::string& name, const Constant* CV, bool c unsigned Data = 0; if (CE->getOpcode() == Instruction::Add) { Data = cast<ConstantInt>(CE->getOperand(1))->getZExtValue(); - CE = dyn_cast<ConstantExpr>(CE->getOperand(0)); + CE = cast<ConstantExpr>(CE->getOperand(0)); } assert(CE->isCast()); Value *V = CE->getOperand(0); |