[PATCH] D14775: [FunctionAttrs] Provide a mechanism for adding function attributes from the command line
Charlie Turner via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 18 07:12:06 PST 2015
chatur01 added a subscriber: chatur01.
chatur01 added a comment.
Hi James, this LGTM.
One nit inline. It would be nice if you could use a `StringRef` in in `cl::list`, but that doesn't seem possible.
================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:1894
@@ +1893,3 @@
+ for (auto &S : ForceAttributes) {
+ auto KV = StringRef(S).split(':');
+ if (KV.first != F->getName())
----------------
Think you'll want a bit of extra checking here. What if I pass `-force-attribute foo:` by accident? Will get a segfault.
Repository:
rL LLVM
http://reviews.llvm.org/D14775
More information about the llvm-commits
mailing list