diff options
author | Roman Divacky <rdivacky@freebsd.org> | 2011-02-10 16:52:03 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@freebsd.org> | 2011-02-10 16:52:03 +0000 |
commit | be4c8705e499b55548467eb7adaa23cbc6edfef9 (patch) | |
tree | 180fd2910e4cbbdcd9dca8d8e7d54e347c7a3ccc /lib/Driver/Tools.cpp | |
parent | 9186ff310cf0ad92ec7f39b2c9dcb7e848195052 (diff) |
Implement mcount profiling, enabled via -pg.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index fdc2b82cb8..a1ae8b19a1 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1313,6 +1313,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_femit_all_decls); Args.AddLastArg(CmdArgs, options::OPT_fheinous_gnu_extensions); Args.AddLastArg(CmdArgs, options::OPT_flimit_debug_info); + Args.AddLastArg(CmdArgs, options::OPT_pg); // -flax-vector-conversions is default. if (!Args.hasFlag(options::OPT_flax_vector_conversions, @@ -1743,13 +1744,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, C.addCommand(new Command(JA, *this, Exec, CmdArgs)); - // Explicitly warn that these options are unsupported, even though - // we are allowing compilation to continue. - for (arg_iterator it = Args.filtered_begin(options::OPT_pg), - ie = Args.filtered_end(); it != ie; ++it) { - (*it)->claim(); - D.Diag(clang::diag::warn_drv_clang_unsupported) << (*it)->getAsString(Args); - } + if (Arg *A = Args.getLastArg(options::OPT_pg)) + if (Args.hasArg(options::OPT_fomit_frame_pointer)) + D.Diag(clang::diag::err_drv_argument_not_allowed_with) + << "-fomit-frame-pointer" << A->getAsString(Args); // Claim some arguments which clang supports automatically. |