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

Summary: Adds a new -f[no]split-lto-unit flag that is disabled by default to control module splitting during ThinLTO. It is automatically enabled for -fsanitize=cfi and -fwhole-program-vtables. The new EnableSplitLTOUnit codegen flag is passed down to llvm via a new module flag of the same name. Depends on D53890. Reviewers: pcc Subscribers: ormris, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D53891 llvm-svn: 350949
16 lines
495 B
C++
16 lines
495 B
C++
// RUN: %clang_cc1 -flto=thin -triple x86_64-unknown-linux -fvisibility hidden -emit-llvm-bc -o %t %s
|
|
// RUN: llvm-dis -o - %t | FileCheck %s
|
|
// RUN: %clang_cc1 -flto=thin -flto-unit -fno-lto-unit -triple x86_64-unknown-linux -fvisibility hidden -emit-llvm-bc -o %t %s
|
|
// RUN: llvm-dis -o - %t | FileCheck %s
|
|
// RUN: llvm-bcanalyzer -dump %t | FileCheck %s --check-prefix=NOLTOUNIT
|
|
// NOLTOUNIT: <FLAGS op0=0/>
|
|
|
|
// CHECK-NOT: !type
|
|
class A {
|
|
virtual void f() {}
|
|
};
|
|
|
|
A *f() {
|
|
return new A;
|
|
}
|