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
13 lines
352 B
C++
13 lines
352 B
C++
// RUN: %clang_cc1 -emit-llvm -triple mipsel--linux-gnu -mconstructor-aliases -o - %s | FileCheck %s
|
|
|
|
// The target attribute code used to get confused with aliases. Make sure
|
|
// we don't crash when an alias is used.
|
|
|
|
struct B {
|
|
B();
|
|
};
|
|
B::B() {
|
|
}
|
|
|
|
// CHECK: @_ZN1BC1Ev = dso_local unnamed_addr alias void (%struct.B*), void (%struct.B*)* @_ZN1BC2Ev
|