aboutsummaryrefslogtreecommitdiffstats
path: root/test/Instrumentation/InstrProfiling/no-counters.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Instrumentation/InstrProfiling/no-counters.ll')
-rw-r--r--test/Instrumentation/InstrProfiling/no-counters.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Instrumentation/InstrProfiling/no-counters.ll b/test/Instrumentation/InstrProfiling/no-counters.ll
new file mode 100644
index 0000000..0716b0d
--- /dev/null
+++ b/test/Instrumentation/InstrProfiling/no-counters.ll
@@ -0,0 +1,10 @@
+;; No instrumentation should be emitted if there are no counter increments.
+
+; RUN: opt < %s -instrprof -S | FileCheck %s
+; CHECK-NOT: @__llvm_profile_counters
+; CHECK-NOT: @__llvm_profile_data
+; CHECK-NOT: @__llvm_profile_runtime
+
+define void @foo() {
+ ret void
+}