diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1439,6 +1439,8 @@ 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: diff --git a/llvm/test/Bitcode/attributes.ll b/llvm/test/Bitcode/attributes.ll --- a/llvm/test/Bitcode/attributes.ll +++ b/llvm/test/Bitcode/attributes.ll @@ -459,6 +459,12 @@ ret void; } +; CHECK: define void @f78() #49 +define void @f78() noprofile +{ + ret void; +} + ; CHECK: attributes #0 = { noreturn } ; CHECK: attributes #1 = { nounwind } ; CHECK: attributes #2 = { readnone } @@ -508,4 +514,5 @@ ; CHECK: attributes #46 = { vscale_range(1,8) } ; CHECK: attributes #47 = { vscale_range(1,0) } ; CHECK: attributes #48 = { nosanitize_coverage } +; CHECK: attributes #49 = { noprofile } ; CHECK: attributes #[[NOBUILTIN]] = { nobuiltin }