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
This commit is contained in:
Chris Lattner 2004-11-15 21:46:40 +00:00
parent 55d85402f6
commit 94bd315c3f
1 changed files with 3 additions and 3 deletions

View File

@ -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);