This is an archive of the discontinued LLVM Phabricator instance.

Use both OS and Architecture to choose correct ABI
ClosedPublic

Authored by abhishek.aggarwal on Jun 8 2015, 5:02 AM.

Details

Summary
  • In ABIMacOSX_i386.cpp:
    • Earlier, only Triple:Arch was used to choose ABI
    • Now, Triple:OS is also used along with Triple:Arch
  • Resolves PR-23718

Change-Id: Id8b1d86dda763241f9e594a1c71252555939af1e
Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Diff Detail

Event Timeline

abhishek.aggarwal retitled this revision from to Use both OS and Architecture to choose correct ABI.
abhishek.aggarwal updated this object.
abhishek.aggarwal edited the test plan for this revision. (Show Details)
abhishek.aggarwal added a subscriber: Unknown Object (MLST).Jun 8 2015, 5:36 AM
jasonmolenda accepted this revision.Jun 22 2015, 9:23 PM
jasonmolenda edited edge metadata.

On Mac OS X there's these "simulator" processes used for debugging iOS apps on the Mac. They are native i386/x86_64 code, they use the native Mac OS X ABI, but they link against different libraries so it behaves like an iOS device. These processes will have an architecture like i386-apple-ios. So I'd also allow for arch.GetTriple().isiOS() to activate this plugin.

This revision is now accepted and ready to land.Jun 22 2015, 9:23 PM

If I understood you correctly, you want to add arch.GetTriple().isiOS() also along with arch.GetTriple().isMacOSX(). Am I right ? If yes then I will do it.

clayborg requested changes to this revision.Jun 26 2015, 10:44 AM
clayborg edited edge metadata.

Add iOS as well as noted in the inline comment.

source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
240

add

arch.GetTriple().isIOS()

as well

This revision now requires changes to proceed.Jun 26 2015, 10:44 AM
abhishek.aggarwal edited edge metadata.

Followed up on Jason's comments

  • Added check for the presence of iOS
clayborg accepted this revision.Jun 29 2015, 11:31 AM
clayborg edited edge metadata.

looks good.

This revision is now accepted and ready to land.Jun 29 2015, 11:31 AM