This is an archive of the discontinued LLVM Phabricator instance.

[WinEH] Recognize CoreCLR personality function
ClosedPublic

Authored by JosephTremoulet on Oct 5 2015, 2:12 PM.

Details

Summary
  • Add CoreCLR to if/else ladders and switches as appropriate.
  • Rename isMSVCEHPersonality to isFuncletEHPersonality to better reflect what it captures.

Diff Detail

Event Timeline

JosephTremoulet retitled this revision from to [WinEH] Recognize CoreCLR personality function.
JosephTremoulet updated this object.
JosephTremoulet added a subscriber: llvm-commits.

I'm not wedded to the name isWinCFIPersonality if people are opposed to conflating WinCFI with use of these handlers. I just thought MSVC didn't make sense with CLR included. I thought about isWinEHPersonality and variants, but since (a) we don't use these on e.g. MinGW and (b) CoreCLR will likely use these on non-Windows, tying it to WinCFI seemed most apt.

rnk edited edge metadata.Oct 5 2015, 3:31 PM

I'm not wedded to the name isWinCFIPersonality if people are opposed to conflating WinCFI with use of these handlers. I just thought MSVC didn't make sense with CLR included. I thought about isWinEHPersonality and variants, but since (a) we don't use these on e.g. MinGW and (b) CoreCLR will likely use these on non-Windows, tying it to WinCFI seemed most apt.

I agree, MSVC doesn't make sense. I don't think "CFI" makes sense, since that's mainly about call frame information, which x86 Windows doesn't even have. My first thought was that it should be isWinEHPersonality. I rationalized that the CoreCLR personality comes from Windows even if it works elsewhere, and __gxx_personality_seh0 comes from Unix even though it runs on Windows.

David likes isFuncletEHPersonality, and I think that's a winner for me. Does that sound like a reasonable shade of chartreuse for the bikeshed? :)

JosephTremoulet added subscribers: AndyAyers, pgavlin.
In D13449#260224, @rnk wrote:

I'm not wedded to the name isWinCFIPersonality if people are opposed to conflating WinCFI with use of these handlers. I just thought MSVC didn't make sense with CLR included. I thought about isWinEHPersonality and variants, but since (a) we don't use these on e.g. MinGW and (b) CoreCLR will likely use these on non-Windows, tying it to WinCFI seemed most apt.

I agree, MSVC doesn't make sense. I don't think "CFI" makes sense, since that's mainly about call frame information, which x86 Windows doesn't even have. My first thought was that it should be isWinEHPersonality. I rationalized that the CoreCLR personality comes from Windows even if it works elsewhere, and __gxx_personality_seh0 comes from Unix even though it runs on Windows.

David likes isFuncletEHPersonality, and I think that's a winner for me. Does that sound like a reasonable shade of chartreuse for the bikeshed? :)

Yeah, isFuncletEHPersonality sounds better than the others to me, will update. Thanks!

JosephTremoulet updated this object.
  • Rename isWinCFIPersonality -> isFuncletEHPersonality
  • Rebase
rnk accepted this revision.Oct 6 2015, 11:23 AM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Oct 6 2015, 11:23 AM