diff --git a/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp b/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp index f32ca3ae216c..a204a1ea916d 100644 --- a/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp +++ b/contrib/llvm/tools/lldb/source/Expression/ClangExpressionParser.cpp @@ -333,8 +333,8 @@ ClangExpressionParser::Parse (Stream &stream) if (!created_main_file) { - std::unique_ptr memory_buffer = MemoryBuffer::getMemBufferCopy(expr_text, __FUNCTION__); - SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(memory_buffer))); + MemoryBuffer *memory_buffer = MemoryBuffer::getMemBufferCopy(expr_text, __FUNCTION__); + SourceMgr.setMainFileID(SourceMgr.createFileID(memory_buffer)); } diag_buf->BeginSourceFile(m_compiler->getLangOpts(), &m_compiler->getPreprocessor()); diff --git a/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp b/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp index 090f88fc1bfe..76956082da07 100644 --- a/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp +++ b/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp @@ -295,7 +295,7 @@ IRExecutionUnit::GetRunnableInfo(Error &error, m_module_ap->getContext().setInlineAsmDiagnosticHandler(ReportInlineAsmError, &error); - llvm::EngineBuilder builder(std::move(m_module_ap)); + llvm::EngineBuilder builder(m_module_ap.get()); builder.setEngineKind(llvm::EngineKind::JIT) .setErrorStr(&error_string) @@ -326,6 +326,10 @@ IRExecutionUnit::GetRunnableInfo(Error &error, error.SetErrorStringWithFormat("Couldn't JIT the function: %s", error_string.c_str()); return; } + else + { + m_module_ap.release(); // ownership was transferred + } // Make sure we see all sections, including ones that don't have relocations... m_execution_engine_ap->setProcessAllSections(true); diff --git a/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp b/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp index aae96bfa9a3b..addff1ab3d5e 100644 --- a/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp +++ b/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp @@ -1778,10 +1778,12 @@ ClangASTContext::CreateFunctionType (ASTContext *ast, // TODO: Detect calling convention in DWARF? FunctionProtoType::ExtProtoInfo proto_info; proto_info.Variadic = is_variadic; - proto_info.ExceptionSpec = EST_None; + proto_info.ExceptionSpecType = EST_None; proto_info.TypeQuals = type_quals; proto_info.RefQualifier = RQ_None; - + proto_info.NumExceptions = 0; + proto_info.Exceptions = nullptr; + return ClangASTType (ast, ast->getFunctionType (result_type.GetQualType(), qual_type_args, proto_info).getAsOpaquePtr());