diff options
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 0441acb..2bfe915 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -948,7 +948,8 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) { // The extension word has this format: bit 0 = has initializer, bit 1-3 = // linkage, bit 4-8 = alignment (log2), bits 10+ = future use. - unsigned ExtWord = (unsigned)I->hasInitializer() | (getEncodedLinkage(I) << 1) | + unsigned ExtWord = (unsigned)I->hasInitializer() | + (getEncodedLinkage(I) << 1) | ((Log2_32(I->getAlignment())+1) << 4); output_vbr(ExtWord); } |