[WinEHPrepare] Don't rely on the order of IR
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 10 Apr 2015 04:56:17 +0000 (04:56 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 10 Apr 2015 04:56:17 +0000 (04:56 +0000)
commitd480d308b0d3e9d5b7657de69cd3ac24d2acd4cf
tree697492b278b8de22f24e076edef3fe8d328d9e6a
parent36f934a2076404d22bf84a8ccf7a8252367e6d24
[WinEHPrepare] Don't rely on the order of IR

The IPToState table must be emitted after we have generated labels for
all functions in the table.  Don't rely on the order of the list of
globals.  Instead, utilize WinEHFuncInfo to tell us how many catch
handlers we expect to outline.  Once we know we've visited all the catch
handlers, emit the cppxdata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234566 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/WinEHFuncInfo.h
lib/CodeGen/AsmPrinter/Win64Exception.cpp
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp