const Value *pointer_operand = load_inst->getPointerOperand();
- Type *pointer_ty = pointer_operand->getType();
- PointerType *pointer_ptr_ty = dyn_cast<PointerType>(pointer_ty);
- if (!pointer_ptr_ty) {
- LLDB_LOGF(log, "getPointerOperand()->getType() is not a PointerType");
- error.SetErrorToGenericError();
- error.SetErrorString(interpreter_internal_error);
- return false;
- }
- Type *target_ty = pointer_ptr_ty->getElementType();
-
lldb::addr_t D = frame.ResolveValue(load_inst, module);
lldb::addr_t P = frame.ResolveValue(pointer_operand, module);
return false;
}
+ Type *target_ty = load_inst->getType();
size_t target_size = data_layout.getTypeStoreSize(target_ty);
lldb_private::DataBufferHeap buffer(target_size, 0);
const Value *value_operand = store_inst->getValueOperand();
const Value *pointer_operand = store_inst->getPointerOperand();
- Type *pointer_ty = pointer_operand->getType();
- PointerType *pointer_ptr_ty = dyn_cast<PointerType>(pointer_ty);
- if (!pointer_ptr_ty)
- return false;
- Type *target_ty = pointer_ptr_ty->getElementType();
-
lldb::addr_t D = frame.ResolveValue(value_operand, module);
lldb::addr_t P = frame.ResolveValue(pointer_operand, module);
return false;
}
+ Type *target_ty = value_operand->getType();
size_t target_size = data_layout.getTypeStoreSize(target_ty);
lldb_private::DataBufferHeap buffer(target_size, 0);
// Construct a new result global and set up its metadata
GlobalVariable *new_result_global = new GlobalVariable(
- (*m_module), result_global->getType()->getElementType(),
+ (*m_module), result_global->getValueType(),
false, /* not constant */
GlobalValue::ExternalLinkage, nullptr, /* no initializer */
m_result_name.GetCString());