Don't wipe out global variables that are probably storing pointers to heap
authorNick Lewycky <nicholas@mxc.ca>
Thu, 19 Jul 2012 22:35:28 +0000 (22:35 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Thu, 19 Jul 2012 22:35:28 +0000 (22:35 +0000)
commit39e357fafe074babbd9661f3e78239f5ebe7c429
tree98140fd0d928eb480e01756a415c151ced01607f
parent7f5714f4392590e5a97113a18e1a4e9ad0315571
Don't wipe out global variables that are probably storing pointers to heap
memory. This makes clang play nice with leak checkers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160529 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/2009-11-16-BrokenPerformHeapAllocSRoA.ll
test/Transforms/GlobalOpt/cleanup-pointer-root-users.ll [new file with mode: 0644]