[llvm-dev] Idiomatic way to replace all occurrences of a pattern in a string with Regex

Jakub Kuderski via llvm-dev llvm-dev at lists.llvm.org
Tue Aug 9 10:08:54 PDT 2016


Lets say that I have a string like this: %78 = OpCompositeInsert %v4float
%77 %17 0
and I want to add to add w suffix to every name beginning with '%'.

What is the most idiomatic/elegant way to do it using llvm::Regex? Or is
there a better tool to do so?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160809/fa3bed2a/attachment.html>

More information about the llvm-dev mailing list