Clang currently exits with an error message if asked to disassemble a
multi-module bitcode file which is used by ThinLTO to allow for Whole
Program Devirtualization and CFI. This might be confusing to some who are not
familiar with bitcode formats. In addition, multi-module bitcode files
are reasonably common. This patch makes clang's behavior consistent for
all common bitcode files.
Example usage:
clang -c -flto=thin -fwhole-program-vtables -fvisibility=hidden virtual.cpp clang -x ir -S -emit-llvm virtual.o # Writes virtual.0.ll and virtual.1.ll
Without -fsanitize=cfi or -fwhole-program-vtables, -fsplit-lto-unit is not the default. You need to specify this option explicitly.
%clang is normally used for test/Driver tests. For other tests, prefer %clang_cc1.