[WinEH] _except_handlerN uses 0 instead of 1 to indicate catch-all

Our usage of 1 was a holdover from __C_specific_handler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Kleckner
2015-06-10 18:14:07 +00:00
parent b78ea510c1
commit 3de99b70aa
3 changed files with 7 additions and 9 deletions

View File

@ -612,12 +612,10 @@ void WinException::emitExceptHandlerTable(const MachineFunction *MF) {
"gaps in the SEH scope table");
for (const SEHHandler &Handler : LPInfo->SEHHandlers) {
// Emit the filter or finally function pointer, if present. Otherwise,
// emit '1' to indicate a catch-all.
const MCExpr *FilterOrFinally;
if (const Function *F = Handler.FilterOrFinally)
FilterOrFinally = create32bitRef(Asm->getSymbol(F));
else
FilterOrFinally = MCConstantExpr::create(1, Asm->OutContext);
// emit '0' to indicate a catch-all.
const Function *F = Handler.FilterOrFinally;
const MCExpr *FilterOrFinally =
create32bitRef(F ? Asm->getSymbol(F) : nullptr);
// Compute the recovery address, which is a block address or null.
const BlockAddress *BA = Handler.RecoverBA;