aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-26 16:37:00 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-26 16:37:00 +0000
commit069afd5c8c515ce483fd2f2a91daa355f66ff478 (patch)
tree35e7bbd6c69249e44f82ecee86f5f5ec0a7dcecf
parentce341cbe89e8f37624d6e46e959abb3d24e8f9c7 (diff)
Driver: Forward -fno-common to clang.
- <rdar://problem/6710978> ccc/clang-driver ignore -fno-common git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67762 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Driver/Options.def1
-rw-r--r--test/CodeGen/no-common.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def
index 76fe06d9a8..dc1ce15cd5 100644
--- a/include/clang/Driver/Options.def
+++ b/include/clang/Driver/Options.def
@@ -387,6 +387,7 @@ OPTION("-fnext-runtime", fnext_runtime, Flag, clang_f_Group, INVALID, "", 0)
OPTION("-fno-blocks", fno_blocks, Flag, clang_f_Group, INVALID, "", 0)
OPTION("-fno-builtin", fno_builtin, Flag, clang_f_Group, INVALID, "", 0)
OPTION("-fno-caret-diagnostics", fno_caret_diagnostics, Flag, clang_f_Group, INVALID, "", 0)
+OPTION("-fno-common", fno_common, Flag, clang_f_Group, INVALID, "", 0)
OPTION("-fno-constant-cfstrings", fno_constant_cfstrings, Flag, f_Group, INVALID, "", 0)
OPTION("-fno-eliminate-unused-debug-symbols", fno_eliminate_unused_debug_symbols, Flag, f_Group, INVALID, "", 0)
OPTION("-fno-math-errno", fno_math_errno, Flag, f_Group, INVALID, "", 0)
diff --git a/test/CodeGen/no-common.c b/test/CodeGen/no-common.c
new file mode 100644
index 0000000000..190873c745
--- /dev/null
+++ b/test/CodeGen/no-common.c
@@ -0,0 +1,6 @@
+// RUN: clang -emit-llvm -S -o %t %s &&
+// RUN: grep '@x = common global' %t &&
+// RUN: clang -fno-common -emit-llvm -S -o %t %s &&
+// RUN: grep '@x = global' %t
+
+int x;