summaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-15 21:46:40 +0000
committerChris Lattner <sabre@nondot.org>2004-11-15 21:46:40 +0000
commit86c936576150295078ce1e468d8800e6d62614e0 (patch)
tree87a45e0d6141494b0543e8f8c179bc9438801c5d /lib/Bytecode/Writer
parent18549c25d60f5abd4e8620ef3a04fe69c40cbe6b (diff)
downloadllvm-86c936576150295078ce1e468d8800e6d62614e0.tar.gz
llvm-86c936576150295078ce1e468d8800e6d62614e0.tar.bz2
llvm-86c936576150295078ce1e468d8800e6d62614e0.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer')
-rw-r--r--lib/Bytecode/Writer/Writer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 7d578f966e..2550d107c3 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/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);