diff options
author | Tim Northover <tnorthover@apple.com> | 2019-05-29 20:46:38 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2019-05-29 20:46:38 +0000 |
commit | 71ee3d02372af7361eda0b59163cf92653ac2bbb (patch) | |
tree | 6e62b423c129caa0b420c5e10382284d65898514 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | 4b281755ae4951ca83c287680b47d77433f3ee0a (diff) | |
download | llvm-71ee3d02372af7361eda0b59163cf92653ac2bbb.zip llvm-71ee3d02372af7361eda0b59163cf92653ac2bbb.tar.gz llvm-71ee3d02372af7361eda0b59163cf92653ac2bbb.tar.bz2 |
Revert "IR: add optional type to 'byval' function parameters"
The IRLinker doesn't delve into the new byval attribute when mapping types, and
this breaks LTO.
llvm-svn: 362029
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index d243815..8e1e062 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -747,7 +747,7 @@ void ModuleBitcodeWriter::writeAttributeGroupTable() { Record.push_back(1); Record.push_back(getAttrKindEncoding(Attr.getKindAsEnum())); Record.push_back(Attr.getValueAsInt()); - } else if (Attr.isStringAttribute()) { + } else { StringRef Kind = Attr.getKindAsString(); StringRef Val = Attr.getValueAsString(); @@ -758,13 +758,6 @@ void ModuleBitcodeWriter::writeAttributeGroupTable() { Record.append(Val.begin(), Val.end()); Record.push_back(0); } - } else { - assert(Attr.isTypeAttribute()); - Type *Ty = Attr.getValueAsType(); - Record.push_back(Ty ? 6 : 5); - Record.push_back(getAttrKindEncoding(Attr.getKindAsEnum())); - if (Ty) - Record.push_back(VE.getTypeID(Attr.getValueAsType())); } } @@ -4133,15 +4126,15 @@ void ModuleBitcodeWriter::write() { // Emit blockinfo, which defines the standard abbreviations etc. writeBlockInfo(); - // Emit information describing all of the types in the module. - writeTypeTable(); - // Emit information about attribute groups. writeAttributeGroupTable(); // Emit information about parameter attributes. writeAttributeTable(); + // Emit information describing all of the types in the module. + writeTypeTable(); + writeComdats(); // Emit top-level description of module, including target triple, inline asm, |