[PATCH] D35908: [YAML] Use {Specific}BumpPtrAllocators for HNodes.
Juergen Ributzka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 10:30:43 PDT 2017
ributzka marked an inline comment as done.
ributzka added inline comments.
================
Comment at: llvm/lib/Support/YAMLTraits.cpp:357
}
- return llvm::make_unique<ScalarHNode>(N, KeyStr);
+ return new (HNodeAllocator.Allocate<ScalarNode>()) ScalarHNode(N, KeyStr);
} else if (BlockScalarNode *BSN = dyn_cast<BlockScalarNode>(N)) {
----------------
zturner wrote:
> This is a little confusing. Why are you calling `Allocate<ScalarNode>()` but then actually constructing a `ScalarHNode` instead of a `ScalarNode`?
Oops, that is a typo. Thanks for catching this.
https://reviews.llvm.org/D35908
More information about the llvm-commits
mailing list