[llvm-commits] [llvm] r104951 - in /llvm/trunk: lib/Analysis/Lint.cpp test/Other/lint.ll
Dan Gohman
gohman at apple.com
Fri May 28 09:34:49 PDT 2010
Author: djg
Date: Fri May 28 11:34:49 2010
New Revision: 104951
URL: http://llvm.org/viewvc/llvm-project?rev=104951&view=rev
Log:
Eli pointed out that va_arg instruction result values don't
reference the stack.
Modified:
llvm/trunk/lib/Analysis/Lint.cpp
llvm/trunk/test/Other/lint.ll
Modified: llvm/trunk/lib/Analysis/Lint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/Lint.cpp?rev=104951&r1=104950&r2=104951&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/Lint.cpp (original)
+++ llvm/trunk/lib/Analysis/Lint.cpp Fri May 28 11:34:49 2010
@@ -232,9 +232,9 @@
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 @@
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);
}
}
Modified: llvm/trunk/test/Other/lint.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/lint.ll?rev=104951&r1=104950&r2=104951&view=diff
==============================================================================
--- llvm/trunk/test/Other/lint.ll (original)
+++ llvm/trunk/test/Other/lint.ll Fri May 28 11:34:49 2010
@@ -87,8 +87,8 @@
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 @@
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*
More information about the llvm-commits
mailing list