diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-13 17:21:33 +0000 |
commit | e289d81369914678db386f6aa86faf8f178e245d (patch) | |
tree | 5fb05e9bbab057038b28cf6e4e87696f1c8cc8de /lib/Frontend/CompilerInvocation.cpp | |
parent | 8c7f4bca64d5128311ce50449ae9d2048c2ffea4 (diff) |
Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.
AST serialization changes are next up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index e7b8854224..6c999caf24 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -713,11 +713,11 @@ static void LangOptsToArgs(const LangOptions &Opts, Res.push_back("-fshort-wchar"); if (!Opts.ElideConstructors) Res.push_back("-fno-elide-constructors"); - if (Opts.getGCMode() != LangOptions::NonGC) { - if (Opts.getGCMode() == LangOptions::HybridGC) { + if (Opts.getGC() != LangOptions::NonGC) { + if (Opts.getGC() == LangOptions::HybridGC) { Res.push_back("-fobjc-gc"); } else { - assert(Opts.getGCMode() == LangOptions::GCOnly && "Invalid GC mode!"); + assert(Opts.getGC() == LangOptions::GCOnly && "Invalid GC mode!"); Res.push_back("-fobjc-gc-only"); } } @@ -744,9 +744,9 @@ static void LangOptsToArgs(const LangOptions &Opts, if (Opts.InlineVisibilityHidden) Res.push_back("-fvisibility-inlines-hidden"); - if (Opts.getStackProtectorMode() != 0) { + if (Opts.getStackProtector() != 0) { Res.push_back("-stack-protector"); - Res.push_back(llvm::utostr(Opts.getStackProtectorMode())); + Res.push_back(llvm::utostr(Opts.getStackProtector())); } if (Opts.InstantiationDepth != DefaultLangOpts.InstantiationDepth) { Res.push_back("-ftemplate-depth"); @@ -1586,9 +1586,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, if (Opts.ObjC1) { if (Args.hasArg(OPT_fobjc_gc_only)) - Opts.setGCMode(LangOptions::GCOnly); + Opts.setGC(LangOptions::GCOnly); else if (Args.hasArg(OPT_fobjc_gc)) - Opts.setGCMode(LangOptions::HybridGC); + Opts.setGC(LangOptions::HybridGC); else if (Args.hasArg(OPT_fobjc_arc)) { Opts.ObjCAutoRefCount = 1; if (!Args.hasArg(OPT_fobjc_nonfragile_abi)) @@ -1737,9 +1737,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Diags.Report(diag::err_drv_invalid_value) << Args.getLastArg(OPT_stack_protector)->getAsString(Args) << SSP; break; - case 0: Opts.setStackProtectorMode(LangOptions::SSPOff); break; - case 1: Opts.setStackProtectorMode(LangOptions::SSPOn); break; - case 2: Opts.setStackProtectorMode(LangOptions::SSPReq); break; + case 0: Opts.setStackProtector(LangOptions::SSPOff); break; + case 1: Opts.setStackProtector(LangOptions::SSPOn); break; + case 2: Opts.setStackProtector(LangOptions::SSPReq); break; } } |