Index: lib/Bitcode/Writer/BitcodeWriter.cpp |
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp |
index e758f944947c606d41fa585fc0c664582a598519..44453a98f921592cceb468ecbd178b04d8a5d6ce 100644 |
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp |
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp |
@@ -1605,17 +1605,17 @@ static void WriteModule(const Module *M, BitstreamWriter &Stream) { |
// Emit metadata. |
WriteModuleMetadata(M, VE, Stream); |
- // Emit function bodies. |
- for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F) |
- if (!F->isDeclaration()) |
- WriteFunction(*F, VE, Stream); |
- |
// Emit metadata. |
WriteModuleMetadataStore(M, Stream); |
// Emit names for globals/functions etc. |
WriteValueSymbolTable(M->getValueSymbolTable(), VE, Stream); |
+ // Emit function bodies. |
+ for (Module::const_iterator F = M->begin(), E = M->end(); F != E; ++F) |
+ if (!F->isDeclaration()) |
+ WriteFunction(*F, VE, Stream); |
+ |
Stream.ExitBlock(); |
} |