mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 14:16:06 +00:00

In ThinLTO mode, type metadata will require the module to be written as a multi-module bitcode file, which is currently incompatible with the Darwin linker. It is also useful to be able to enable or disable multi-module bitcode for testing purposes. This introduces a cc1-level flag, -f{,no-}lto-unit, which is used by the driver to enable multi-module bitcode on all but Darwin+ThinLTO, and can also be used to enable/disable the feature manually. Differential Revision: https://reviews.llvm.org/D28877 llvm-svn: 292448
13 lines
405 B
C++
13 lines
405 B
C++
// RUN: %clang_cc1 -flto -flto-unit -emit-llvm -o - -triple=x86_64-pc-win32 %s -fsanitize=cfi-vcall | FileCheck --check-prefix=RTTI %s
|
|
// RUN: %clang_cc1 -flto -flto-unit -emit-llvm -o - -triple=x86_64-pc-win32 %s -fsanitize=cfi-vcall -fno-rtti-data | FileCheck --check-prefix=NO-RTTI %s
|
|
|
|
struct A {
|
|
A();
|
|
virtual void f() {}
|
|
};
|
|
|
|
A::A() {}
|
|
|
|
// RTTI: !{i64 8, !"?AUA@@"}
|
|
// NO-RTTI: !{i64 0, !"?AUA@@"}
|