hfinkel added inline comments.

================
Comment at: lib/CodeGen/CGDecl.cpp:1219-1224
@@ +1218,8 @@
+
+  std::string Name = CurFn->getName();
+  Name += ": ";
+  Name += D.getName();
+
+  llvm::MDNode *Scope =
+    MDB.createAnonymousAliasScope(NoAliasDomain, Name);
+  addNoAliasScope(Scope);
----------------
majnemer wrote:
> It's a shame that `createAnonymousAARoot` doesn't take a twine, it would save 
> a memory allocation through here.
I'm not sure what you're proposing, exactly. MDBuilder::createString takes a 
StringRef (and, correspondingly MDString::get does). If createAnonymousAARoot 
took a Twine, it would need to allocate some SmallVector and then call 
toStringRef. Is that what you have in mind?



http://reviews.llvm.org/D9403




_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to