mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-05 13:46:08 +00:00

Summary: Clang -fpic defaults to -fno-semantic-interposition (GCC -fpic defaults to -fsemantic-interposition). Users need to specify -fsemantic-interposition to get semantic interposition behavior. Semantic interposition is currently a best-effort feature. There may still be some cases where it is not handled well. Reviewers: peter.smith, rnk, serge-sans-paille, sfertile, jfb, jdoerfert Subscribers: dschuff, jyknight, dylanmckay, nemanjai, jvesely, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, arphaman, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D73865
18 lines
469 B
C++
18 lines
469 B
C++
// REQUIRES: arm-registered-target
|
|
// RUN: %clang_cc1 -triple armv7-none-linux-androideabi -target-abi aapcs-linux -mfloat-abi hard -x c++ -emit-llvm %s -o - | FileCheck %s
|
|
|
|
struct Vec2 {
|
|
union { struct { float x, y; };
|
|
float data[2];
|
|
};
|
|
};
|
|
|
|
// CHECK: define dso_local arm_aapcs_vfpcc %struct.Vec2 @_Z7getVec2v()
|
|
// CHECK: ret %struct.Vec2
|
|
Vec2 getVec2() {
|
|
Vec2 out;
|
|
union { Vec2* v; unsigned char* u; } x;
|
|
x.v = &out;
|
|
return out;
|
|
}
|