Driver: -mkernel disables default use of unwind tables (although I
don't yet understand where this is happening in llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70012 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 8ff8197..e180543 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -301,7 +301,8 @@
     // < 3)
     if (Args.hasFlag(options::OPT_funwind_tables,
                      options::OPT_fno_unwind_tables,
-                     getToolChain().IsUnwindTablesDefault()))
+                     (getToolChain().IsUnwindTablesDefault() &&
+                      !Args.hasArg(options::OPT_mkernel))))
       CmdArgs.push_back("--unwind-tables=1");
     else
       CmdArgs.push_back("--unwind-tables=0");