From 1e8052b36d17af63d669d41a1a5893f255a1f370 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 4 Feb 2009 21:19:06 +0000 Subject: 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). llvm-svn: 63776 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 18870722fa2..af70a9c8464 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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; } -- cgit v1.2.3