summaryrefslogtreecommitdiff
path: root/test/Transforms/FunctionAttrs
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-07-03 04:00:54 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-07-03 04:00:54 +0000
commit7cb0321ad8d86c9fdfb70d3bfa1ff3e8e1ff9f71 (patch)
treed5b34fedfc6186717465cac0b080dca668f3604b /test/Transforms/FunctionAttrs
parentf0f85eab0469ac93f9bb6c7d19aca2c35868d83a (diff)
downloadllvm-7cb0321ad8d86c9fdfb70d3bfa1ff3e8e1ff9f71.tar.gz
llvm-7cb0321ad8d86c9fdfb70d3bfa1ff3e8e1ff9f71.tar.bz2
llvm-7cb0321ad8d86c9fdfb70d3bfa1ff3e8e1ff9f71.tar.xz
Added support in FunctionAttrs for adding relevant function/argument attributes for the posix call gettimeofday.
This implies annotating it as nounwind and its arguments as nocapture. To be conservative, we do not annotate the arguments with noalias since some platforms do not have restrict on the declaration for gettimeofday. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/FunctionAttrs')
-rw-r--r--test/Transforms/FunctionAttrs/annotate-1.ll3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Transforms/FunctionAttrs/annotate-1.ll b/test/Transforms/FunctionAttrs/annotate-1.ll
index ae77380acc..d8e90cf1c3 100644
--- a/test/Transforms/FunctionAttrs/annotate-1.ll
+++ b/test/Transforms/FunctionAttrs/annotate-1.ll
@@ -14,5 +14,8 @@ declare i32* @realloc(i32*, i32)
declare i32 @strcpy(...)
; CHECK: declare i32 @strcpy(...)
+declare i32 @gettimeofday(i8*, i8*)
+; CHECK: declare i32 @gettimeofday(i8* nocapture, i8* nocapture) [[G0]]
+
; CHECK: attributes [[G0]] = { nounwind }
; CHECK: attributes [[G1]] = { nounwind readonly }