diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2009-06-12 05:20:12 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2009-06-12 05:20:12 +0000 |
commit | f7e498138f2f15b9391274d0c062fa62ab2e86fc (patch) | |
tree | 01170237089d700844b43d2d695218602b262ca6 /lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 084f7bf8a741fdeb97bf7f2a1befd11758f504e7 (diff) |
Don't remove aggregate-typed module level constants before encoding functions
since functions may contain aggregate constants too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | lib/Bitcode/Writer/BitcodeWriter.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index 9f16728d49..6dcddedef1 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -1308,16 +1308,6 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) { // Emit constants. WriteModuleConstants(VE, Stream); - // 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; - Vals.push_back(NumNonAggregates); - Stream.EmitRecord(bitc::MODULE_CODE_PURGEVALS, Vals); - } - // Emit function bodies. for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) if (!I->isDeclaration()) |