[cfe-dev] Removed functionality

David Blaikie dblaikie at gmail.com
Sat Dec 13 08:22:01 PST 2014


Nothing too drastic, just an API change/update I made in
http://llvm.org/viewvc/llvm-project?view=revision&revision=222319 -
removing the un-STL-like GetOrCreateValue in favor of the more standard
'insert'. That commit has many examples of API updates you can use to guide
your own. Do feel free to ask if you have further questions/it's unclear
how to migrate your code.

On Fri, Dec 12, 2014 at 4:52 PM, Alexandros Tzannes <atzannes at illinois.edu>
wrote:

> Hi all,
>
> I am using clang as a framework to implement an analysis for my research
> (ASaP: Annotations for Safe Parallelism), and I just merged with ToT. I
> have been using the following line of code to get command line flags passed
> to my analysis using the -analyzer-config flag:
>
> Mgr.getAnalyzerOptions().Config.GetOrCreateValue(OptionName,
> "simple").getValue()
>
> OptionName (is a stringRef) is the option I want to read. This line of
> code would return the argument to OptionName given on the command line or
> "simple" if the option was not specified.
>
> The GetOrCreateValue method seems to have been removed now from the
> llvm::StringMap. I had asked over a year ago how to pass parameters to my
> custom passes, and I was shown this method. Perhaps there is a better way
> now that doesn't use GetOrCreateValue (which does not exist anymore anyway).
>
> So my question boils down to this: Should I write code to emulate the
> behavior of GetOrCreateValue, or is there a new and improved way to pass
> arguments to custom passes? I work in the static analyzer by the way.
>
> Thanks a bunch!
> Alex
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141213/424fa5b2/attachment.html>


More information about the cfe-dev mailing list