move PR1604 here.

llvm-svn: 57582
This commit is contained in:
Chris Lattner 2008-10-15 16:06:03 +00:00
parent 4ccc775d89
commit 866578b51b

View File

@ -954,3 +954,20 @@ should remove it, but it doesn't apply to memory objects.
//===---------------------------------------------------------------------===//
Better mod/ref analysis for scanf would allow us to eliminate the vtable and a
bunch of other stuff from this example (see PR1604):
#include <cstdio>
struct test {
int val;
virtual ~test() {}
};
int main() {
test t;
std::scanf("%d", &t.val);
std::printf("%d\n", t.val);
}
//===---------------------------------------------------------------------===//