LLDB  mainline
TraceExporter.cpp
Go to the documentation of this file.
1 //===-- TraceExporter.cpp -------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
12 
13 using namespace lldb;
14 using namespace lldb_private;
15 using namespace llvm;
16 
17 static Error createInvalidPlugInError(StringRef plugin_name) {
18  return createStringError(
19  std::errc::invalid_argument,
20  "no trace expoter plug-in matches the specified type: \"%s\"",
21  plugin_name.data());
22 }
23 
24 Expected<lldb::TraceExporterUP>
25 TraceExporter::FindPlugin(llvm::StringRef name) {
26  if (auto create_callback =
27  PluginManager::GetTraceExporterCreateCallback(name))
28  return create_callback();
29 
30  return createInvalidPlugInError(name);
31 }
llvm
Definition: Debugger.h:50
TraceExporter.h
createInvalidPlugInError
static Error createInvalidPlugInError(StringRef plugin_name)
Definition: TraceExporter.cpp:17
PluginManager.h
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
Error
llvm::Error Error
Definition: UdtRecordCompleter.cpp:30
lldb
Definition: SBAddress.h:15