[PATCH] D46632: [LLVM-C] Move DIBuilder Bindings For Temporary MDNodes

Robert Widmann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 9 20:19:04 PDT 2018


CodaFi added a comment.

llvm::Value::replaceAllUsesWith and llvm::MDNode::replaceAllUsesWith are distinct operations.  The former assumes the source and replacement values are the same type, the latter assumes that you're trying to build up a graph of dummy metadata for an incomplete or recursive definition that you will eventually finalize by replacing it with real nodes.

I do agree with the name change for dispose - and it is actually a useful operation to have.  We're handing ownership of temporary metadata nodes to the caller and if they don't RAUW they will leak.


Repository:
  rL LLVM

https://reviews.llvm.org/D46632





More information about the llvm-commits mailing list