[llvm-commits] CVS: llvm/lib/Bitcode/Writer/Writer.cpp
Chris Lattner
sabre at nondot.org
Wed Apr 25 20:33:01 PDT 2007
Changes in directory llvm/lib/Bitcode/Writer:
Writer.cpp updated: 1.10 -> 1.11
---
Log message:
improve a comment
---
Diffs of the changes: (+5 -3)
Writer.cpp | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Index: llvm/lib/Bitcode/Writer/Writer.cpp
diff -u llvm/lib/Bitcode/Writer/Writer.cpp:1.10 llvm/lib/Bitcode/Writer/Writer.cpp:1.11
--- llvm/lib/Bitcode/Writer/Writer.cpp:1.10 Wed Apr 25 22:27:58 2007
+++ llvm/lib/Bitcode/Writer/Writer.cpp Wed Apr 25 22:32:43 2007
@@ -572,8 +572,9 @@
// Emit constants.
WriteModuleConstants(VE, Stream);
- // FIXME: Purge aggregate values from the VE, emit a record that indicates how
- // many to purge.
+ // If we have any aggregate values in the value table, purge them - these can
+ // only be used to initialize global variables. Doing so makes the value
+ // namespace smaller for code in functions.
int NumNonAggregates = VE.PurgeAggregateValues();
if (NumNonAggregates != -1) {
SmallVector<unsigned, 1> Vals;
@@ -583,7 +584,8 @@
// Emit function bodies.
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
- WriteFunction(*I, VE, Stream);
+ if (!I->isDeclaration())
+ WriteFunction(*I, VE, Stream);
// Emit the type symbol table information.
WriteTypeSymbolTable(M->getTypeSymbolTable(), VE, Stream);
More information about the llvm-commits
mailing list