NFC: Fix warning for uninitialized field.

PiperOrigin-RevId: 270704572
This commit is contained in:
River Riddle 2019-09-23 10:19:45 -07:00 committed by A. Unique TensorFlower
parent 59e3b30af0
commit 4b6b58ec0f
1 changed files with 3 additions and 1 deletions

View File

@ -114,6 +114,8 @@ private:
/// is the name of a pass, the InnerPipeline is empty, since passes cannot
/// contain inner pipelines.
struct PipelineElement {
PipelineElement(StringRef name) : name(name), registryEntry(nullptr) {}
StringRef name;
const PassRegistryEntry *registryEntry;
std::vector<PipelineElement> innerPipeline;
@ -178,7 +180,7 @@ LogicalResult TextualPipeline::parsePipelineText(StringRef text,
for (;;) {
std::vector<PipelineElement> &pipeline = *pipelineStack.back();
size_t pos = text.find_first_of(",()");
pipeline.push_back({text.substr(0, pos).trim(), {}});
pipeline.emplace_back(/*name=*/text.substr(0, pos).trim());
// If we have a single terminating name, we're done.
if (pos == text.npos)