Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
Show All 26 Lines | |||||
llvm::Optional<Header> Header::parse(llvm::StringRef text) { | llvm::Optional<Header> Header::parse(llvm::StringRef text) { | ||||
llvm::StringRef line; | llvm::StringRef line; | ||||
std::tie(line, text) = text.split('\n'); | std::tie(line, text) = text.split('\n'); | ||||
auto Module = ModuleRecord::parse(line); | auto Module = ModuleRecord::parse(line); | ||||
if (!Module) | if (!Module) | ||||
return llvm::None; | return llvm::None; | ||||
llvm::Triple triple; | llvm::Triple triple; | ||||
triple.setArch(Module->getArch()); | triple.setArch(Module->Arch); | ||||
triple.setOS(Module->getOS()); | triple.setOS(Module->OS); | ||||
std::tie(line, text) = text.split('\n'); | std::tie(line, text) = text.split('\n'); | ||||
auto Info = InfoRecord::parse(line); | auto Info = InfoRecord::parse(line); | ||||
UUID uuid = Info && Info->getID() ? Info->getID() : Module->getID(); | UUID uuid = Info && Info->ID ? Info->ID : Module->ID; | ||||
return Header{ArchSpec(triple), std::move(uuid)}; | return Header{ArchSpec(triple), std::move(uuid)}; | ||||
} | } | ||||
void ObjectFileBreakpad::Initialize() { | void ObjectFileBreakpad::Initialize() { | ||||
PluginManager::RegisterPlugin(GetPluginNameStatic(), | PluginManager::RegisterPlugin(GetPluginNameStatic(), | ||||
GetPluginDescriptionStatic(), CreateInstance, | GetPluginDescriptionStatic(), CreateInstance, | ||||
CreateMemoryInstance, GetModuleSpecifications); | CreateMemoryInstance, GetModuleSpecifications); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 124 Lines • Show Last 20 Lines |