forked from OSchip/llvm-project
[trace] avoid using <regex>
Easy fix based on the feedback by maskray on https://reviews.llvm.org/D85705.
This commit is contained in:
parent
a60852e9d6
commit
ed621e76a9
|
@ -14,14 +14,14 @@ using namespace llvm;
|
|||
|
||||
StringRef TraceIntelPTSettingsParser::GetPluginSchema() {
|
||||
return R"({
|
||||
"type": "intel-pt",
|
||||
"pt_cpu": {
|
||||
"vendor": "intel" | "unknown",
|
||||
"family": integer,
|
||||
"model": integer,
|
||||
"stepping": integer
|
||||
}
|
||||
})";
|
||||
"type": "intel-pt",
|
||||
"pt_cpu": {
|
||||
"vendor": "intel" | "unknown",
|
||||
"family": integer,
|
||||
"model": integer,
|
||||
"stepping": integer
|
||||
}
|
||||
})";
|
||||
}
|
||||
|
||||
llvm::Error TraceIntelPTSettingsParser::ParsePTCPU(const json::Object &trace) {
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "lldb/Target/TraceSettingsParser.h"
|
||||
|
||||
#include <regex>
|
||||
#include <sstream>
|
||||
|
||||
#include "Plugins/Process/Utility/HistoryThread.h"
|
||||
|
@ -123,12 +122,7 @@ StringRef TraceSettingsParser::GetSchema() {
|
|||
if (schema.empty()) {
|
||||
std::ostringstream schema_builder;
|
||||
schema_builder << "{\n \"trace\": ";
|
||||
|
||||
// We need to add spaces to indent correctly the plugin schema
|
||||
std::string plugin_schema(GetPluginSchema());
|
||||
plugin_schema = std::regex_replace(plugin_schema, std::regex("\n"), "\n ");
|
||||
schema_builder << plugin_schema << ",\n";
|
||||
|
||||
schema_builder << GetPluginSchema().str() << ",\n";
|
||||
schema_builder << R"( "processes": [
|
||||
{
|
||||
"pid": integer,
|
||||
|
|
Loading…
Reference in New Issue