[PATCH] D104995: [BitCode] Add noprofile to getAttrFromCode()

Nathan Chancellor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 27 12:01:54 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4ae0ab095bf9: [BitCode] Add noprofile to getAttrFromCode() (authored by nathanchance).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104995/new/

https://reviews.llvm.org/D104995

Files:
  llvm/lib/Bitcode/Reader/BitcodeReader.cpp
  llvm/test/Bitcode/attributes.ll


Index: llvm/test/Bitcode/attributes.ll
===================================================================
--- llvm/test/Bitcode/attributes.ll
+++ 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 }
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ 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:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104995.354762.patch
Type: text/x-patch
Size: 1209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210627/0263e2fa/attachment.bin>


More information about the llvm-commits mailing list