Fixes to make id work as well as well as fix minor errors
when calling built-ins.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121070 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/IRForTarget.cpp b/source/Expression/IRForTarget.cpp
index 5910098..6d730d9 100644
--- a/source/Expression/IRForTarget.cpp
+++ b/source/Expression/IRForTarget.cpp
@@ -964,6 +964,10 @@
if (!fun)
return false;
}
+ else if (const_expr && const_expr->getOpcode() == Instruction::IntToPtr)
+ {
+ return true; // already resolved
+ }
else
{
return false;
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index cd143a9..f40ad15 100644
--- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2933,7 +2933,7 @@
}
else if (type_name_const_str == g_objc_type_name_selector)
{
- clang_type = ast.CreatePointerType(ast.GetBuiltInType_objc_selector());
+ clang_type = ast.GetBuiltInType_objc_selector();
resolve_state = Type::eResolveStateFull;
}
}
diff --git a/source/Symbol/ClangASTContext.cpp b/source/Symbol/ClangASTContext.cpp
index 14af2ab..d93fc59 100644
--- a/source/Symbol/ClangASTContext.cpp
+++ b/source/Symbol/ClangASTContext.cpp
@@ -677,7 +677,7 @@
clang_type_t
ClangASTContext::GetBuiltInType_objc_id()
{
- return getASTContext()->ObjCBuiltinIdTy.getAsOpaquePtr();
+ return getASTContext()->getPointerType(getASTContext()->ObjCBuiltinIdTy).getAsOpaquePtr();
}
clang_type_t
@@ -689,7 +689,7 @@
clang_type_t
ClangASTContext::GetBuiltInType_objc_selector()
{
- return getASTContext()->ObjCBuiltinSelTy.getAsOpaquePtr();
+ return getASTContext()->getPointerType(getASTContext()->ObjCBuiltinSelTy).getAsOpaquePtr();
}
clang_type_t