phunix/external/bsd/llvm/dist/clang/test/Frontend/profile-sample-use-loc-tracking.c
Lionel Sambuc 0a6a1f1d05 NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the
10-10-2015.

This updates:
 - LLVM to 3.6.1
 - GCC to GCC 5.1
 - Replace minix/commands/zdump with usr.bin/zdump
 - external/bsd/libelf has moved to /external/bsd/elftoolchain/
 - Import ctwm
 - Drop sprintf from libminc

Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
2016-01-13 20:32:14 +01:00

20 lines
738 B
C

// This file tests that -fprofile-sample-use enables location tracking
// generation in the same way that -Rpass does. The sample profiler needs
// to associate line locations in the profile to the code, so it needs the
// frontend to emit source location annotations.
// RUN: %clang_cc1 %s -fprofile-sample-use=%S/Inputs/profile-sample-use-loc-tracking.prof -emit-llvm -o - 2>/dev/null | FileCheck %s
// -fprofile-sample-use should produce source location annotations, exclusively
// (just like -gmlt).
// CHECK: , !dbg !
// CHECK-NOT: DW_TAG_base_type
// But llvm.dbg.cu should be missing (to prevent writing debug info to
// the final output).
// CHECK-NOT: !llvm.dbg.cu = !{
int bar(int j) {
return (j + j - 2) * (j - 2) * j;
}