Extend 'readonly' and 'readnone' to work on function arguments as well as
functions. Make the function attributes pass add it to known library functions
and when it can deduce it.
llvm-svn: 185735
diff --git a/llvm/test/Transforms/FunctionAttrs/2009-01-04-Annotate.ll b/llvm/test/Transforms/FunctionAttrs/2009-01-04-Annotate.ll
index d414b73..fa06cc7 100644
--- a/llvm/test/Transforms/FunctionAttrs/2009-01-04-Annotate.ll
+++ b/llvm/test/Transforms/FunctionAttrs/2009-01-04-Annotate.ll
@@ -1,6 +1,6 @@
; RUN: opt < %s -functionattrs -S | FileCheck %s
-; CHECK: declare noalias i8* @fopen(i8* nocapture, i8* nocapture) #0
+; CHECK: declare noalias i8* @fopen(i8* nocapture readonly, i8* nocapture readonly) #0
declare i8* @fopen(i8*, i8*)
; CHECK: declare i8 @strlen(i8* nocapture) #1