]> granicus.if.org Git - llvm/commit
Zero-Initialize PrevInstBB when entering a new MachineFunction.
authorAdrian Prantl <aprantl@apple.com>
Thu, 23 Mar 2017 20:23:42 +0000 (20:23 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 23 Mar 2017 20:23:42 +0000 (20:23 +0000)
commit5787d18e9cea5563045277310f9dd638dbe6b955
tree2a45c2e83b173646587213f4a8e83f8e9d0e0fee
parenta1c1557043ff77f7971551a5d892034abd82f31d
Zero-Initialize PrevInstBB when entering a new MachineFunction.

It is not guaranteed that the memory used for MachineBasicBlocks in
the previous MachineFunction hasn't been freed, so holding on to a
pointer to the last function's isn't correct. Particularly I have
observed the sret.ll testcase failing because the first BasicBlock in
the new function happened to be allocated to the exact same memory as
the previously saved and (deleted) PrevInstBB.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298642 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp