diff options
Diffstat (limited to 'test/Profile/cxx-implicit.cpp')
-rw-r--r-- | test/Profile/cxx-implicit.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Profile/cxx-implicit.cpp b/test/Profile/cxx-implicit.cpp new file mode 100644 index 0000000..79840ad --- /dev/null +++ b/test/Profile/cxx-implicit.cpp @@ -0,0 +1,17 @@ +// Ensure that implicit methods aren't instrumented. + +// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-implicit.cpp -o - -emit-llvm -fprofile-instr-generate | FileCheck %s + +// An implicit constructor is generated for Base. We should not emit counters +// for it. +// CHECK-NOT: @__llvm_profile_counters__ZN4BaseC2Ev = + +struct Base { + virtual void foo(); +}; + +struct Derived : public Base { + Derived(); +}; + +Derived::Derived() {} |