Skip to content
Snippets Groups Projects
Commit ab2a421d authored by Axel Naumann's avatar Axel Naumann
Browse files

Initialize langopts more closely to what Tools.cpp (Clang::ConstructJob) is...

Initialize langopts more closely to what Tools.cpp (Clang::ConstructJob) is doing, to end up with a compatible LangOpt set in cling and PCHs.


git-svn-id: http://root.cern.ch/svn/root/trunk@41593 27541ba8-7e3a-0410-8455-c3a389f83636
parent d0550d9a
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,10 @@ namespace cling { ...@@ -168,6 +168,10 @@ namespace cling {
void CIFactory::SetClingCustomLangOpts(LangOptions& Opts) { void CIFactory::SetClingCustomLangOpts(LangOptions& Opts) {
Opts.EmitAllDecls = 1; Opts.EmitAllDecls = 1;
Opts.ObjCNonFragileABI2 = 0;
Opts.Exceptions = 1;
Opts.CXXExceptions = 1;
Opts.Deprecated = 1;
} }
void CIFactory::SetClingTargetLangOpts(LangOptions& Opts, void CIFactory::SetClingTargetLangOpts(LangOptions& Opts,
...@@ -177,6 +181,18 @@ namespace cling { ...@@ -177,6 +181,18 @@ namespace cling {
Opts.MSCVersion = 1300; Opts.MSCVersion = 1300;
// Should fix http://llvm.org/bugs/show_bug.cgi?id=10528 // Should fix http://llvm.org/bugs/show_bug.cgi?id=10528
Opts.DelayedTemplateParsing = 1; Opts.DelayedTemplateParsing = 1;
} else {
Opts.MicrosoftExt = 0;
}
if (Target.getTriple().getArch() == llvm::Triple::x86) {
Opts.ObjCNonFragileABI = 1;
} else {
Opts.ObjCNonFragileABI = 0;
}
if (Target.getTriple().isOSDarwin()) {
Opts.NeXTRuntime = 1;
} else {
Opts.NeXTRuntime = 0;
} }
} }
} // end namespace } // end namespace
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment