diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-15 21:46:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-15 21:46:40 +0000 |
commit | 94bd315c3fcbb22a44e8bb15a32fe4450aac2866 (patch) | |
tree | d979b2348ae447fbd531a1a2b724d00fbd774f96 /llvm/lib/Bytecode/Writer/Writer.cpp | |
parent | 55d85402f6de4e91478ca21ff920fe9c17acdef3 (diff) | |
download | bcm5719-llvm-94bd315c3fcbb22a44e8bb15a32fe4450aac2866.tar.gz bcm5719-llvm-94bd315c3fcbb22a44e8bb15a32fe4450aac2866.zip |
If a function is external, do not output a FunctionBlock for the function
AT ALL. This saves 11 bytes per external function from the bytecode file,
and is also required to make GhostLinkage work.
llvm-svn: 17854
Diffstat (limited to 'llvm/lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index 7d578f966e1..2550d107c3e 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/lib/Bytecode/Writer/Writer.cpp @@ -942,12 +942,12 @@ void BytecodeWriter::outputInstructions(const Function *F) { } void BytecodeWriter::outputFunction(const Function *F) { - BytecodeBlock FunctionBlock(BytecodeFormat::FunctionBlockID, *this); - output_vbr(getEncodedLinkage(F)); - // If this is an external function, there is nothing else to emit! if (F->isExternal()) return; + BytecodeBlock FunctionBlock(BytecodeFormat::FunctionBlockID, *this); + output_vbr(getEncodedLinkage(F)); + // Get slot information about the function... Table.incorporateFunction(F); |