[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

Mingming Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 1 14:17:31 PDT 2023


================
@@ -0,0 +1,145 @@
+// Test that type metadata are emitted with -fprofile-generate
+//
+// RUN: %clang -fprofile-generate -fno-lto -target x86_64-unknown-linux -emit-llvm -S %s -o - | FileCheck %s --check-prefix=ITANIUM
+// RUN: %clang -fprofile-generate -fno-lto -target x86_64-pc-windows-msvc -emit-llvm -S %s -o - | FileCheck %s --check-prefix=MS
----------------
minglotus-6 wrote:

This test is forked from https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGenCXX/type-metadata.cpp.

It's currently put under directory clang/test/Driver since `-fprofile-generate` is a driver option.

I'm wondering if it's more idiomatic to create the corresponding clang compiler options for `-fprofile-generate` for what I'm trying to do here? That way I could update `clang/test/CodeGenCXX/type-metadata.cpp` for test coverage.

https://github.com/llvm/llvm-project/pull/70841


More information about the cfe-commits mailing list