summaryrefslogtreecommitdiff
path: root/lib/Analysis/Lint.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-26 22:21:25 +0000
committerDan Gohman <gohman@apple.com>2010-05-26 22:21:25 +0000
commit882ddb492d9d5497514ac5c084686f07716115e8 (patch)
treec80eb03d7dc1eafb2a29a603bc9a5b39338e041c /lib/Analysis/Lint.cpp
parent6f0ff1d578cfa333164e806c2290f02dd5ebebd1 (diff)
downloadllvm-882ddb492d9d5497514ac5c084686f07716115e8.tar.gz
llvm-882ddb492d9d5497514ac5c084686f07716115e8.tar.bz2
llvm-882ddb492d9d5497514ac5c084686f07716115e8.tar.xz
Reinstate checking of stackrestore, with checking for both Read
and Write, and add a comment explaining this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Lint.cpp')
-rw-r--r--lib/Analysis/Lint.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp
index a19e13ef17..1fae14f801 100644
--- a/lib/Analysis/Lint.cpp
+++ b/lib/Analysis/Lint.cpp
@@ -285,6 +285,14 @@ void Lint::visitCallSite(CallSite CS) {
visitMemoryReference(I, CS.getArgument(0), 0, 0,
MemRef::Read | MemRef::Write);
break;
+
+ case Intrinsic::stackrestore:
+ // Stackrestore doesn't read or write memory, but it sets the
+ // stack pointer, which the compiler may read from or write to
+ // at any time, so check it for both readability and writeability.
+ visitMemoryReference(I, CS.getArgument(0), 0, 0,
+ MemRef::Read | MemRef::Write);
+ break;
}
}