diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Support/YAMLParser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Support/YAMLParser.cpp b/llvm/lib/Support/YAMLParser.cpp index 162a22bd910..41d446744fe 100644 --- a/llvm/lib/Support/YAMLParser.cpp +++ b/llvm/lib/Support/YAMLParser.cpp @@ -2377,11 +2377,13 @@ parse_property: , AnchorInfo.Range.substr(1) , TagInfo.Range , T.Range); - case Token::TK_BlockScalar: + case Token::TK_BlockScalar: { getNext(); + StringRef StrCopy = StringRef(T.Value).copy(NodeAllocator); return new (NodeAllocator) BlockScalarNode(stream.CurrentDoc, AnchorInfo.Range.substr(1), - TagInfo.Range, T.Value, T.Range); + TagInfo.Range, StrCopy, T.Range); + } case Token::TK_Key: // Don't eat the TK_Key, KeyValueNode expects it. return new (NodeAllocator) |

