aboutsummaryrefslogtreecommitdiff
path: root/Driver/clang.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-04 21:19:06 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-04 21:19:06 +0000
commitd604c40e933c445ff33ac83d62cc6b1adcf7014c (patch)
tree22d5401327786d4c221e2e0ea484cc44c7375e49 /Driver/clang.cpp
parent4b5f0a4bd6645e87e5feae4be4675ce87d97b4a5 (diff)
Add -femit-all-decls codegen option.
- Emits all declarations, even unused (static) ones. - Useful when doing minimization of codegen problems (otherwise problems localized to a static function aren't minimized well). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/clang.cpp')
-rw-r--r--Driver/clang.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index c6fee1f09e..bf885ea464 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -500,6 +500,9 @@ static llvm::cl::opt<bool>
ObjCNonFragileABI("fobjc-nonfragile-abi",
llvm::cl::desc("enable objective-c's nonfragile abi"));
+static llvm::cl::opt<bool>
+EmitAllDecls("femit-all-decls",
+ llvm::cl::desc("Emit all declarations, even if unused"));
// FIXME: This (and all GCC -f options) really come in -f... and
// -fno-... forms, and additionally support automagic behavior when
@@ -635,6 +638,9 @@ static void InitializeLanguageStandard(LangOptions &Options, LangKind LK,
if (ObjCNonFragileABI)
Options.ObjCNonFragileABI = 1;
+
+ if (EmitAllDecls)
+ Options.EmitAllDecls = 1;
}
static llvm::cl::opt<bool>