diff options
author | Nathan Chancellor <nathan@kernel.org> | 2021-06-27 11:59:57 -0700 |
---|---|---|
committer | Nathan Chancellor <nathan@kernel.org> | 2021-06-27 11:59:57 -0700 |
commit | 4ae0ab095bf97123c2d2a6aa2e82dcc25cf040f1 (patch) | |
tree | d9a561c3a9995acccbe327372440fd77bcfd9fa8 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | e81702912e6247c3adeb7e0c8416d6251d3b452a (diff) | |
download | llvm-4ae0ab095bf97123c2d2a6aa2e82dcc25cf040f1.zip llvm-4ae0ab095bf97123c2d2a6aa2e82dcc25cf040f1.tar.gz llvm-4ae0ab095bf97123c2d2a6aa2e82dcc25cf040f1.tar.bz2 |
[BitCode] Add noprofile to getAttrFromCode()
After D104475 / D104658, building the Linux kernel with ThinLTO is
broken:
ld.lld: error: Unknown attribute kind (73) (Producer: 'LLVM13.0.0git'
Reader: 'LLVM 13.0.0git')
getAttrFromCode() has never handled this attribute so it is written
during the ThinLTO phase but it cannot be handled during the linking
phase.
Add noprofile to getAttrFromCode() so that disassembly works properly.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D104995
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 7deb193..8f8bd73 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1439,6 +1439,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) { return Attribute::NoSync; case bitc::ATTR_KIND_NOCF_CHECK: return Attribute::NoCfCheck; + case bitc::ATTR_KIND_NO_PROFILE: + return Attribute::NoProfile; case bitc::ATTR_KIND_NO_UNWIND: return Attribute::NoUnwind; case bitc::ATTR_KIND_NO_SANITIZE_COVERAGE: |