I would like to use the clang Frontend api to build a file and output
the IR code. I have found that I can set the TargetInfo on the
CompilerInstance but I cant seem to set the LangStandard to c++11.
Instead I have to provide an argument and call
CompilerInvocation::CreateFromArgs to get the LangStandard setting.
What am I doing wrong in my code (see
https://github.com/peteasa/llvm-env/blob/master/proj/first-steps/src/main/src/main.cxx for the full listing)?
std::shared_ptr<clang::TargetOptions> pTargetOptions =
clang::TargetInfo *pTargetInfo =
compInst.setTarget(pTargetInfo); // this works ok setting the