forked from OSchip/llvm-project
Fix build break due to signature change on ASTContext' setExternalSource parameter.
This change converts points to clang::ExternalASTSource from llvm::OwningPtr<> to llvm::IntrusiveRefCntPtr<>. llvm-svn: 202411
This commit is contained in:
parent
e8c311a40c
commit
955fe6f6ed
|
@ -94,7 +94,7 @@ public:
|
||||||
HasExternalSource ();
|
HasExternalSource ();
|
||||||
|
|
||||||
void
|
void
|
||||||
SetExternalSource (llvm::OwningPtr<clang::ExternalASTSource> &ast_source_ap);
|
SetExternalSource (llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> &ast_source_ap);
|
||||||
|
|
||||||
void
|
void
|
||||||
RemoveExternalSource ();
|
RemoveExternalSource ();
|
||||||
|
|
|
@ -168,7 +168,7 @@ AppleObjCTypeVendor::AppleObjCTypeVendor(ObjCLanguageRuntime &runtime) :
|
||||||
m_ast_ctx(runtime.GetProcess()->GetTarget().GetArchitecture().GetTriple().getTriple().c_str())
|
m_ast_ctx(runtime.GetProcess()->GetTarget().GetArchitecture().GetTriple().getTriple().c_str())
|
||||||
{
|
{
|
||||||
m_external_source = new AppleObjCExternalASTSource (*this);
|
m_external_source = new AppleObjCExternalASTSource (*this);
|
||||||
llvm::OwningPtr<clang::ExternalASTSource> external_source_owning_ptr (m_external_source);
|
llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> external_source_owning_ptr (m_external_source);
|
||||||
m_ast_ctx.getASTContext()->setExternalSource(external_source_owning_ptr);
|
m_ast_ctx.getASTContext()->setExternalSource(external_source_owning_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -525,7 +525,7 @@ SymbolFileDWARF::GetClangASTContext ()
|
||||||
if (!m_is_external_ast_source)
|
if (!m_is_external_ast_source)
|
||||||
{
|
{
|
||||||
m_is_external_ast_source = true;
|
m_is_external_ast_source = true;
|
||||||
llvm::OwningPtr<clang::ExternalASTSource> ast_source_ap (
|
llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> ast_source_ap (
|
||||||
new ClangExternalASTSourceCallbacks (SymbolFileDWARF::CompleteTagDecl,
|
new ClangExternalASTSourceCallbacks (SymbolFileDWARF::CompleteTagDecl,
|
||||||
SymbolFileDWARF::CompleteObjCInterfaceDecl,
|
SymbolFileDWARF::CompleteObjCInterfaceDecl,
|
||||||
SymbolFileDWARF::FindExternalVisibleDeclsByName,
|
SymbolFileDWARF::FindExternalVisibleDeclsByName,
|
||||||
|
|
|
@ -308,7 +308,7 @@ void
|
||||||
SymbolFileDWARFDebugMap::InitializeObject()
|
SymbolFileDWARFDebugMap::InitializeObject()
|
||||||
{
|
{
|
||||||
// Install our external AST source callbacks so we can complete Clang types.
|
// Install our external AST source callbacks so we can complete Clang types.
|
||||||
llvm::OwningPtr<clang::ExternalASTSource> ast_source_ap (
|
llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> ast_source_ap (
|
||||||
new ClangExternalASTSourceCallbacks (SymbolFileDWARFDebugMap::CompleteTagDecl,
|
new ClangExternalASTSourceCallbacks (SymbolFileDWARFDebugMap::CompleteTagDecl,
|
||||||
SymbolFileDWARFDebugMap::CompleteObjCInterfaceDecl,
|
SymbolFileDWARFDebugMap::CompleteObjCInterfaceDecl,
|
||||||
NULL,
|
NULL,
|
||||||
|
|
|
@ -347,7 +347,7 @@ ClangASTContext::HasExternalSource ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClangASTContext::SetExternalSource (llvm::OwningPtr<ExternalASTSource> &ast_source_ap)
|
ClangASTContext::SetExternalSource (llvm::IntrusiveRefCntPtr<ExternalASTSource> &ast_source_ap)
|
||||||
{
|
{
|
||||||
ASTContext *ast = getASTContext();
|
ASTContext *ast = getASTContext();
|
||||||
if (ast)
|
if (ast)
|
||||||
|
@ -365,7 +365,7 @@ ClangASTContext::RemoveExternalSource ()
|
||||||
|
|
||||||
if (ast)
|
if (ast)
|
||||||
{
|
{
|
||||||
llvm::OwningPtr<ExternalASTSource> empty_ast_source_ap;
|
llvm::IntrusiveRefCntPtr<ExternalASTSource> empty_ast_source_ap;
|
||||||
ast->setExternalSource (empty_ast_source_ap);
|
ast->setExternalSource (empty_ast_source_ap);
|
||||||
ast->getTranslationUnitDecl()->setHasExternalLexicalStorage(false);
|
ast->getTranslationUnitDecl()->setHasExternalLexicalStorage(false);
|
||||||
//ast->getTranslationUnitDecl()->setHasExternalVisibleStorage(false);
|
//ast->getTranslationUnitDecl()->setHasExternalVisibleStorage(false);
|
||||||
|
|
|
@ -1765,7 +1765,7 @@ Target::GetScratchClangASTContext(bool create_on_demand)
|
||||||
m_scratch_ast_context_ap.reset (new ClangASTContext(m_arch.GetTriple().str().c_str()));
|
m_scratch_ast_context_ap.reset (new ClangASTContext(m_arch.GetTriple().str().c_str()));
|
||||||
m_scratch_ast_source_ap.reset (new ClangASTSource(shared_from_this()));
|
m_scratch_ast_source_ap.reset (new ClangASTSource(shared_from_this()));
|
||||||
m_scratch_ast_source_ap->InstallASTContext(m_scratch_ast_context_ap->getASTContext());
|
m_scratch_ast_source_ap->InstallASTContext(m_scratch_ast_context_ap->getASTContext());
|
||||||
llvm::OwningPtr<clang::ExternalASTSource> proxy_ast_source(m_scratch_ast_source_ap->CreateProxy());
|
llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> proxy_ast_source(m_scratch_ast_source_ap->CreateProxy());
|
||||||
m_scratch_ast_context_ap->SetExternalSource(proxy_ast_source);
|
m_scratch_ast_context_ap->SetExternalSource(proxy_ast_source);
|
||||||
}
|
}
|
||||||
return m_scratch_ast_context_ap.get();
|
return m_scratch_ast_context_ap.get();
|
||||||
|
|
Loading…
Reference in New Issue