Clang Project

clang_source_code/test/CodeGenCXX/no-lto-unit.cpp
1// RUN: %clang_cc1 -flto=thin -triple x86_64-unknown-linux -fvisibility hidden -emit-llvm-bc -o %t %s
2// RUN: llvm-dis -o - %t | FileCheck %s
3// RUN: %clang_cc1 -flto=thin -flto-unit -fno-lto-unit -triple x86_64-unknown-linux -fvisibility hidden -emit-llvm-bc -o %t %s
4// RUN: llvm-dis -o - %t | FileCheck %s
5// RUN: llvm-bcanalyzer -dump %t | FileCheck %s --check-prefix=NOLTOUNIT
6// NOLTOUNIT: <FLAGS op0=0/>
7
8// CHECK-NOT: !type
9class A {
10  virtual void f() {}
11};
12
13A *f() {
14  return new A;
15}
16