[cfe-dev] Removed functionality

Alexandros Tzannes atzannes at illinois.edu
Fri Dec 12 16:52:53 PST 2014


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



More information about the cfe-dev mailing list