diff options
author | Chris Lattner <sabre@nondot.org> | 2007-04-26 03:32:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-04-26 03:32:43 +0000 |
commit | 51d5f29c3f4e30edd3a95a520a6c0720603948d5 (patch) | |
tree | 03b9b2fd44310bf15d056e97dc346758fb315879 /lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 198f34ac359c48018c6e1f784cf3770ead63b253 (diff) |
improve a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 654eafea0c..53431dd4e0 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -572,8 +572,9 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) { // 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 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) { // 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); |