aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-28 16:34:49 +0000
committerDan Gohman <gohman@apple.com>2010-05-28 16:34:49 +0000
commit078f8595b5ddc6cf55cc32ceeb82c67d39b3f200 (patch)
treeadb9c57b2ef2cf8da6c92e0e9769538bd79b7c47
parentff26d4e9ceabb48463cc1aaeccfd1784fb52f755 (diff)
Eli pointed out that va_arg instruction result values don't
reference the stack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104951 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/Lint.cpp8
-rw-r--r--test/Other/lint.ll8
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp
index 691b934295..4b9f284c9d 100644
--- a/lib/Analysis/Lint.cpp
+++ b/lib/Analysis/Lint.cpp
@@ -232,9 +232,9 @@ void Lint::visitCallSite(CallSite CS) {
for (CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end();
AI != AE; ++AI) {
Value *Obj = findValue(*AI, /*OffsetOk=*/true);
- Assert1(!isa<AllocaInst>(Obj) && !isa<VAArgInst>(Obj),
+ Assert1(!isa<AllocaInst>(Obj),
"Undefined behavior: Call with \"tail\" keyword references "
- "alloca or va_arg", &I);
+ "alloca", &I);
}
@@ -323,8 +323,8 @@ void Lint::visitReturnInst(ReturnInst &I) {
if (Value *V = I.getReturnValue()) {
Value *Obj = findValue(V, /*OffsetOk=*/true);
- Assert1(!isa<AllocaInst>(Obj) && !isa<VAArgInst>(Obj),
- "Unusual: Returning alloca or va_arg value", &I);
+ Assert1(!isa<AllocaInst>(Obj),
+ "Unusual: Returning alloca value", &I);
}
}
diff --git a/test/Other/lint.ll b/test/Other/lint.ll
index eb6a656f7d..1187eb7b29 100644
--- a/test/Other/lint.ll
+++ b/test/Other/lint.ll
@@ -87,8 +87,8 @@ block:
unreachable
}
-; CHECK: Undefined behavior: Call with "tail" keyword references alloca or va_arg
-; CHECK: Undefined behavior: Call with "tail" keyword references alloca or va_arg
+; CHECK: Undefined behavior: Call with "tail" keyword references alloca
+; CHECK: Undefined behavior: Call with "tail" keyword references alloca
declare void @tailcallee(i8*)
define void @use_tail(i8* %valist) {
%t = alloca i8
@@ -98,14 +98,14 @@ define void @use_tail(i8* %valist) {
ret void
}
-; CHECK: Unusual: Returning alloca or va_arg value
+; CHECK: Unusual: Returning alloca value
define i8* @return_local(i32 %n, i32 %m) {
%t = alloca i8, i32 %n
%s = getelementptr i8* %t, i32 %m
ret i8* %s
}
-; CHECK: Unusual: Returning alloca or va_arg value
+; CHECK: Unusual: Returning alloca value
define i32* @return_obscured_local() {
entry:
%retval = alloca i32*