brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · adfc9ac Raw
33 lines · cpp
1// REQUIRES: x86-registered-target2/// When the input is a -fsplit-lto-unit bitcode file, link the regular LTO file like -mlink-bitcode-file.3// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm-bc -flto=thin -flto-unit -fsplit-lto-unit %s -o %t.bc4// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-obj %t.bc -o %t.o5// RUN: llvm-nm %t.o | FileCheck %s6// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %t.bc -o - | FileCheck %s --check-prefix=CHECK-IR7 8// CHECK:      V _ZTI1A9// CHECK-NEXT: V _ZTI1B10// CHECK-NEXT: V _ZTS1A11// CHECK-NEXT: V _ZTS1B12// CHECK-NEXT: V _ZTV1A13// CHECK-NEXT: V _ZTV1B14 15// CHECK-IR-DAG: _ZTS1B = linkonce_odr constant16// CHECK-IR-DAG: _ZTS1A = linkonce_odr constant17// CHECK-IR-DAG: _ZTV1B = linkonce_odr unnamed_addr constant18// CHECK-IR-DAG: _ZTI1A = linkonce_odr constant19// CHECK-IR-DAG: _ZTI1B = linkonce_odr constant20// CHECK-IR-DAG: _ZTV1A = linkonce_odr unnamed_addr constant21 22struct A {23  virtual int c(int i) = 0;24};25 26struct B : A {27  virtual int c(int i) { return i; }28};29 30int use() {31  return (new B)->c(0);32}33