Updated Clang to a version that supports propagating
the "virtual" flag when importing a C++ function
declaration. Made changes to LLDB to support other
changes in Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124355 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ASTResultSynthesizer.cpp b/source/Expression/ASTResultSynthesizer.cpp
index e581b96..7dd1ab4 100644
--- a/source/Expression/ASTResultSynthesizer.cpp
+++ b/source/Expression/ASTResultSynthesizer.cpp
@@ -290,7 +290,7 @@
(last_expr->getObjectKind() == OK_Ordinary);
QualType expr_qual_type = last_expr->getType();
- clang::Type *expr_type = expr_qual_type.getTypePtr();
+ const clang::Type *expr_type = expr_qual_type.getTypePtr();
if (!expr_type)
return false;
diff --git a/source/Expression/ClangASTSource.cpp b/source/Expression/ClangASTSource.cpp
index a23547d..fa9d50e 100644
--- a/source/Expression/ClangASTSource.cpp
+++ b/source/Expression/ClangASTSource.cpp
@@ -244,7 +244,7 @@
{
QualType qual_type = QualType::getFromOpaquePtr(type);
- if (TagType *tag_type = dyn_cast<clang::TagType>(qual_type))
+ if (const TagType *tag_type = dyn_cast<clang::TagType>(qual_type))
{
TagDecl *tag_decl = tag_type->getDecl();
@@ -252,7 +252,7 @@
return tag_decl;
}
- else if (ObjCObjectType *objc_object_type = dyn_cast<clang::ObjCObjectType>(qual_type))
+ else if (const ObjCObjectType *objc_object_type = dyn_cast<clang::ObjCObjectType>(qual_type))
{
ObjCInterfaceDecl *interface_decl = objc_object_type->getInterface();
diff --git a/source/Expression/IRForTarget.cpp b/source/Expression/IRForTarget.cpp
index fceb67f..517ab13 100644
--- a/source/Expression/IRForTarget.cpp
+++ b/source/Expression/IRForTarget.cpp
@@ -271,8 +271,8 @@
if (m_result_is_pointer)
{
clang::QualType pointer_qual_type = result_decl->getType();
- clang::Type *pointer_type = pointer_qual_type.getTypePtr();
- clang::PointerType *pointer_pointertype = dyn_cast<clang::PointerType>(pointer_type);
+ const clang::Type *pointer_type = pointer_qual_type.getTypePtr();
+ const clang::PointerType *pointer_pointertype = dyn_cast<clang::PointerType>(pointer_type);
if (!pointer_pointertype)
{
@@ -1252,6 +1252,7 @@
Value *val = llvm_call_inst->getCalledValue();
ConstantExpr *const_expr = dyn_cast<ConstantExpr>(val);
+ LoadInst *load_inst = dyn_cast<LoadInst>(val);
if (const_expr && const_expr->getOpcode() == Instruction::BitCast)
{
@@ -1269,6 +1270,10 @@
{
return true; // already resolved
}
+ else if (load_inst)
+ {
+ return true; // virtual method call
+ }
else
{
if (m_error_stream)