[PATCH] D35908: [YAML] Use {Specific}BumpPtrAllocators for HNodes.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 10:16:59 PDT 2017


zturner 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)) {
----------------
This is a little confusing.  Why are you calling `Allocate<ScalarNode>()` but then actually constructing a `ScalarHNode` instead of a `ScalarNode`?


Repository:
  rL LLVM

https://reviews.llvm.org/D35908





More information about the llvm-commits mailing list