aboutsummaryrefslogtreecommitdiff
path: root/lib
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 /lib
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 'lib')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 18870722fa..af70a9c846 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -468,7 +468,7 @@ void CodeGenModule::EmitGlobal(const ValueDecl *Global) {
// If the global is a static, defer code generation until later so
// we can easily omit unused statics.
- if (isStatic) {
+ if (isStatic && !Features.EmitAllDecls) {
StaticDecls.push_back(Global);
return;
}