This option may be used to specify a function's preferred alignment. The -falign-functions option and the aligned attribute now control both the minimum alignment and the preferred alignment for consistency with gcc. In contrast to the previous approach implemented in #149444 the preferred alignment is retained for member functions. Part of this RFC: https://discourse.llvm.org/t/rfc-enhancing-function-alignment-attributes/88019 Reviewers: vitalybuka, MaskRay, AaronBallman, jansvoboda11 Pull Request: https://github.com/llvm/llvm-project/pull/155528
5 lines
184 B
C
5 lines
184 B
C
// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-linux -fpreferred-function-alignment=16 %s -o - | FileCheck %s
|
|
|
|
// CHECK: define {{.*}} void @f() {{.*}} prefalign(16)
|
|
void f() {}
|