Index: test/CMakeLists.txt =================================================================== --- test/CMakeLists.txt +++ test/CMakeLists.txt @@ -96,6 +96,7 @@ llvm-bcanalyzer llvm-cat llvm-dis + llvm-lto2 llvm-modextract llvm-nm llvm-objdump Index: test/CodeGen/thinlto-distributed-cfi-devirt.ll =================================================================== --- test/CodeGen/thinlto-distributed-cfi-devirt.ll +++ test/CodeGen/thinlto-distributed-cfi-devirt.ll @@ -0,0 +1,101 @@ +; REQUIRES: x86-registered-target + +; Backend test for distribute ThinLTO with CFI. +; It additionally enables -fwhole-program-vtables to get more information in +; TYPE_IDs of GLOBALVAL_SUMMARY_BLOCK. + +; RUN: opt -thinlto-bc -o %t.o %s + +; RUN: llvm-lto2 run -thinlto-distributed-indexes %t.o \ +; RUN: -o %t2.index \ +; RUN: -r=%t.o,test,px \ +; RUN: -r=%t.o,_ZN1A1nEi,p \ +; RUN: -r=%t.o,_ZN1B1fEi,p \ +; RUN: -r=%t.o,_ZN1C1fEi,p \ +; RUN: -r=%t.o,_ZTV1B, \ +; RUN: -r=%t.o,_ZTV1C, \ +; RUN: -r=%t.o,_ZN1A1nEi, \ +; RUN: -r=%t.o,_ZN1B1fEi, \ +; RUN: -r=%t.o,_ZN1C1fEi, \ +; RUN: -r=%t.o,_ZTV1B,px \ +; RUN: -r=%t.o,_ZTV1C,px + +; Ensure that typeids are in the index. +; RUN: llvm-bcanalyzer -dump %t.o.thinlto.bc | FileCheck %s +; CHECK-LABEL: +; CHECK-LABEL: +; CHECK-LABEL: