llvm-6502/lib/Transforms
Chris Lattner c7d7e0cbe0 make simplifycfg insert an llvm.trap before the 'unreachable' it introduces
when it detects undefined behavior.  llvm.trap generally codegens into some
thing really small (e.g. a 2 byte ud2 instruction on x86) and debugging this
sort of thing is "nontrivial".  For example, we now compile:

void foo() { *(int*)0 = 42; }

into:

_foo:
	pushl	%ebp
	movl	%esp, %ebp
	ud2

Some may even claim that this is a security hole, though that seems dubious
to me.  This addresses rdar://7958343 - Optimizing away null dereference 
potentially allows arbitrary code execution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 22:15:59 +00:00
..
Hello Prune #includes. 2010-03-01 17:42:17 +00:00
InstCombine Teach instcombine to transform a bitcast/(zext|trunc)/bitcast sequence 2010-05-08 21:50:26 +00:00
Instrumentation Revert 101465, it broke internal OpenGL testing. 2010-04-16 23:37:20 +00:00
IPO revert r102831. We already delete dead readonly calls in 2010-05-01 17:19:38 +00:00
Scalar make simplifycfg insert an llvm.trap before the 'unreachable' it introduces 2010-05-08 22:15:59 +00:00
Utils Wrap const MDNode * inside DIDescriptor. 2010-05-07 20:54:48 +00:00
Makefile Revert r100896 and around - this breaks the only mingw32 buildbot we have. 2010-04-15 19:51:42 +00:00