From db03983238ac7cebd9f09d453847fcc4ee30b8d2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 15 Oct 2008 16:06:03 +0000 Subject: [PATCH] move PR1604 here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57582 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/README.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 173c0bc5f39..9831efbdf64 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -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 +struct test { + int val; + virtual ~test() {} +}; + +int main() { + test t; + std::scanf("%d", &t.val); + std::printf("%d\n", t.val); +} + +//===---------------------------------------------------------------------===// +