diff options
author | Chris Lattner <sabre@nondot.org> | 2001-11-26 18:56:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-11-26 18:56:10 +0000 |
commit | 2263733dcfe04769a36c38ef8208745fead9c427 (patch) | |
tree | e993deed556478a959aeb42d4f08af9a55053058 /llvm/lib/Bytecode/Writer/Writer.cpp | |
parent | 841d8b9e50fcf333c51e6154e4f670c9996bc908 (diff) | |
download | bcm5719-llvm-2263733dcfe04769a36c38ef8208745fead9c427.tar.gz bcm5719-llvm-2263733dcfe04769a36c38ef8208745fead9c427.zip |
Implement internal method support
llvm-svn: 1374
Diffstat (limited to 'llvm/lib/Bytecode/Writer/Writer.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index d0b2eb40b05..c8ce40ba622 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/lib/Bytecode/Writer/Writer.cpp @@ -121,9 +121,10 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) { int Slot = Table.getValSlot(GV->getType()); assert(Slot != -1 && "Module global vars is broken!"); - // Fields: bit0 = isConstant, bit1 = hasInitializer, bit2+ = slot# - unsigned oSlot = ((unsigned)Slot << 2) | (GV->hasInitializer() << 1) | - GV->isConstant(); + // Fields: bit0 = isConstant, bit1 = hasInitializer, bit2=InternalLinkage, + // bit3+ = slot# + unsigned oSlot = ((unsigned)Slot << 3) | (GV->hasInternalLinkage() << 2) | + (GV->hasInitializer() << 1) | GV->isConstant(); output_vbr(oSlot, Out); // If we have an initializer, output it now. @@ -150,9 +151,10 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) { void BytecodeWriter::processMethod(const Method *M) { BytecodeBlock MethodBlock(BytecodeFormat::Method, Out); - + output_vbr((unsigned)M->hasInternalLinkage(), Out); // Only output the constant pool and other goodies if needed... if (!M->isExternal()) { + // Get slot information about the method... Table.incorporateMethod(M); |