[PATCH] D107527: Mark getc_unlocked as unavailable by default
Ryan Prichard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 16:36:13 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG623cf3dfdf3e: Mark getc_unlocked as unavailable by default (authored by rprichard).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107527/new/
https://reviews.llvm.org/D107527
Files:
llvm/lib/Analysis/TargetLibraryInfo.cpp
llvm/test/Transforms/InferFunctionAttrs/annotate.ll
Index: llvm/test/Transforms/InferFunctionAttrs/annotate.ll
===================================================================
--- llvm/test/Transforms/InferFunctionAttrs/annotate.ll
+++ llvm/test/Transforms/InferFunctionAttrs/annotate.ll
@@ -509,7 +509,9 @@
; CHECK: declare noundef i32 @getc(%opaque* nocapture noundef) [[NOFREE_NOUNWIND]]
declare i32 @getc(%opaque*)
-; CHECK: declare noundef i32 @getc_unlocked(%opaque* nocapture noundef) [[NOFREE_NOUNWIND]]
+; CHECK-KNOWN: declare noundef i32 @getc_unlocked(%opaque* nocapture noundef) [[NOFREE_NOUNWIND]]
+; CHECK-UNKNOWN: declare i32 @getc_unlocked(%opaque*)
+; CHECK-UNKNOWN-NOT: #{{.*}}
declare i32 @getc_unlocked(%opaque*)
; CHECK: declare noundef i32 @getchar() [[NOFREE_NOUNWIND]]
Index: llvm/lib/Analysis/TargetLibraryInfo.cpp
===================================================================
--- llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -123,6 +123,7 @@
// Set IO unlocked variants as unavailable
// Set them as available per system below
+ TLI.setUnavailable(LibFunc_getc_unlocked);
TLI.setUnavailable(LibFunc_getchar_unlocked);
TLI.setUnavailable(LibFunc_putc_unlocked);
TLI.setUnavailable(LibFunc_putchar_unlocked);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107527.364651.patch
Type: text/x-patch
Size: 1258 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210805/b6befbc3/attachment.bin>
More information about the llvm-commits
mailing list