From 01ba8545fb6bae2a370606b4f40f0d17eb0a8c6c Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 2 Jun 2011 17:30:53 +0000 Subject: [PATCH] Add -fno-gnu89-inline. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132468 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Options.td | 1 + lib/Driver/Tools.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 2cba46c650..23b351c78a 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -300,6 +300,7 @@ def fno_for_scope : Flag<"-fno-for-scope">, Group; def ffreestanding : Flag<"-ffreestanding">, Group; def fgnu_keywords : Flag<"-fgnu-keywords">, Group; def fgnu89_inline : Flag<"-fgnu89-inline">, Group; +def fno_gnu89_inline : Flag<"-fno-gnu89-inline">, Group; def fgnu_runtime : Flag<"-fgnu-runtime">, Group; def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">; def filelist : Separate<"-filelist">, Flags<[LinkerInput]>; diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index fbc5109207..6af9ba8ccb 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1712,7 +1712,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, options::OPT_fno_gnu_keywords)) A->render(Args, CmdArgs); - if (Arg *A = Args.getLastArg(options::OPT_fgnu89_inline)) + if (Args.hasFlag(options::OPT_fgnu89_inline, + options::OPT_fno_gnu89_inline, + false)) CmdArgs.push_back("-fgnu89-inline"); // -fnext-runtime defaults to on Darwin and when rewriting Objective-C, and is -- 2.50.1