OSDN Git Service

[Linker] Remove warning when linking ARM and Thumb IR modules.
authorFlorian Hahn <florian.hahn@arm.com>
Wed, 7 Jun 2017 09:17:01 +0000 (09:17 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Wed, 7 Jun 2017 09:17:01 +0000 (09:17 +0000)
commit4d6ca733344822e3356fb31a2dd7544eb825d292
tree97844546e48c36ca97fad3e44ccd20b26f4e99a6
parentf7b325279105f5d4c76384675683df6d89d629db
[Linker] Remove warning when linking ARM and Thumb IR modules.

Summary:
This patch updates Triple::isCompatibleWith to make armxx and thumbxx
triples compatible, as long as the subarch, vendor, os, envorionment and
object format match. Thumb/ARM code generation should be controlled
using the thumb-mode per-function target feature rather than by the
triple to allow mixing Thumb and ARM functions.

D33448 updates Clang's codegen to add thumb-mode for all functions with
armxx or thumbxx triples.

Reviewers: echristo, t.p.northover, rafael, kristof.beyls, rengolin, tejohnson

Reviewed By: tejohnson

Subscribers: rinon, eugenis, pcc, srhines, aemerson, mehdi_amini, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D33287

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304884 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Triple.cpp
test/LTO/ARM/Inputs/thumb.ll [new file with mode: 0644]
test/LTO/ARM/link-arm-and-thumb.ll [new file with mode: 0644]
test/Linker/Inputs/thumb.ll [new file with mode: 0644]
test/Linker/link-arm-and-thumb.ll [new file with mode: 0644]