[PATCH] D41669: Teach ValueMapper to use ODR uniqued types when available

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 30 11:15:09 PST 2018


pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.

LGTM with nits



================
Comment at: lib/Transforms/Utils/ValueMapper.cpp:541
+static Metadata *cloneOrBuildODR(const MDNode &N) {
+  auto *CT = dyn_cast_or_null<DICompositeType>(&N);
+  // If ODR type uniquing is enabled, we would have uniqued composite types
----------------
I think this can be `dyn_cast` given that it is a reference.


================
Comment at: lib/Transforms/Utils/ValueMapper.cpp:548
+  return MDNode::replaceWithDistinct(N.clone());
+};
+
----------------
Remove semicolon


Repository:
  rL LLVM

https://reviews.llvm.org/D41669





More information about the llvm-commits mailing list