aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
index 1b7e86bb187f..33e5dd0015ae 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
@@ -404,7 +404,7 @@ bool IRForTarget::RewriteObjCConstString(llvm::GlobalVariable *ns_str,
Type *ns_str_ty = ns_str->getType();
- Type *i8_ptr_ty = Type::getInt8PtrTy(m_module->getContext());
+ Type *i8_ptr_ty = PointerType::getUnqual(m_module->getContext());
Type *i32_ty = Type::getInt32Ty(m_module->getContext());
Type *i8_ty = Type::getInt8Ty(m_module->getContext());
@@ -801,11 +801,11 @@ bool IRForTarget::RewriteObjCSelector(Instruction *selector_load) {
// is uint8_t*
// Type *sel_type = StructType::get(m_module->getContext());
// Type *sel_ptr_type = PointerType::getUnqual(sel_type);
- Type *sel_ptr_type = Type::getInt8PtrTy(m_module->getContext());
+ Type *sel_ptr_type = PointerType::getUnqual(m_module->getContext());
Type *type_array[1];
- type_array[0] = llvm::Type::getInt8PtrTy(m_module->getContext());
+ type_array[0] = llvm::PointerType::getUnqual(m_module->getContext());
ArrayRef<Type *> srN_arg_types(type_array, 1);
@@ -1641,14 +1641,6 @@ bool IRForTarget::runOnModule(Module &llvm_module) {
}
}
- llvm::Type *int8_ty = Type::getInt8Ty(m_module->getContext());
-
- m_reloc_placeholder = new llvm::GlobalVariable(
- (*m_module), int8_ty, false /* IsConstant */,
- GlobalVariable::InternalLinkage, Constant::getNullValue(int8_ty),
- "reloc_placeholder", nullptr /* InsertBefore */,
- GlobalVariable::NotThreadLocal /* ThreadLocal */, 0 /* AddressSpace */);
-
////////////////////////////////////////////////////////////
// Replace $__lldb_expr_result with a persistent variable
//