diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-07-03 04:00:54 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-07-03 04:00:54 +0000 |
commit | 2db11161a8b3e53e4bfdacc6f969cad1abaf1747 (patch) | |
tree | 1f39fbe7e4fcc74fc8b71038ab1a0e68d52d76aa /llvm/test/Transforms/FunctionAttrs/annotate-1.ll | |
parent | f7459c740b623c98e11b586a8034cd7b01df8e1b (diff) | |
download | bcm5719-llvm-2db11161a8b3e53e4bfdacc6f969cad1abaf1747.tar.gz bcm5719-llvm-2db11161a8b3e53e4bfdacc6f969cad1abaf1747.zip |
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.
llvm-svn: 185502
Diffstat (limited to 'llvm/test/Transforms/FunctionAttrs/annotate-1.ll')
-rw-r--r-- | llvm/test/Transforms/FunctionAttrs/annotate-1.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionAttrs/annotate-1.ll b/llvm/test/Transforms/FunctionAttrs/annotate-1.ll index ae77380acc4..d8e90cf1c38 100644 --- a/llvm/test/Transforms/FunctionAttrs/annotate-1.ll +++ b/llvm/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 } |