From a64157f19fa1f41afe10ccc9245e5d36a8f92b15 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Fri, 14 Sep 2018 20:48:34 +0000 Subject: [PATCH] [IRInterpreter] Minor cleanups, add comments. NFCI. llvm-svn: 342280 --- lldb/source/Expression/IRInterpreter.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 2c08d09..ac1c401 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -601,17 +601,13 @@ bool IRInterpreter::CanInterpret(llvm::Module &module, llvm::Function &function, Value *operand = ii->getOperand(oi); Type *operand_type = operand->getType(); - switch (operand_type->getTypeID()) { - default: - break; - case Type::VectorTyID: { + // Vectors are currently unsupported, give up. + if (operand_type->getTypeID() == Type::VectorTyID) if (log) log->Printf("Unsupported operand type: %s", PrintType(operand_type).c_str()); error.SetErrorString(unsupported_operand_error); return false; - } - } // The IR interpreter currently doesn't know about // 128-bit integers. As they're not that frequent, @@ -625,7 +621,7 @@ bool IRInterpreter::CanInterpret(llvm::Module &module, llvm::Function &function, return false; } - if (Constant *constant = llvm::dyn_cast(operand)) { + if (auto *constant = llvm::dyn_cast(operand)) { if (!CanResolveConstant(constant)) { if (log) log->Printf("Unsupported constant: %s", -- 2.7.4