From ecdb454aa72be85c2a99627d719e62bc2a3d49ec Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Sun, 30 Mar 2014 13:00:06 +0000 Subject: [PowerPC] Make -pg generate calls to _mcount not mcount At least on REL6 (Linux/glibc 2.12), the proper symbol for generating gprof data is _mcount, not mcount. Prior to this change, compiling with -pg would generate linking errors (because of unresolved references to mcount), after this change -pg seems at least minimally functional. llvm-svn: 205144 --- clang/test/CodeGen/mcount.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/test/CodeGen/mcount.c') diff --git a/clang/test/CodeGen/mcount.c b/clang/test/CodeGen/mcount.c index 1cf3d6a0716..5c608bcd365 100644 --- a/clang/test/CodeGen/mcount.c +++ b/clang/test/CodeGen/mcount.c @@ -1,4 +1,8 @@ // RUN: %clang_cc1 -pg -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -pg -triple powerpc-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PPC %s +// RUN: %clang_cc1 -pg -triple powerpc64-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PPC %s +// RUN: %clang_cc1 -pg -triple powerpc64le-unknown-gnu-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-PPC %s void foo(void) { // CHECK: call void @mcount() +// CHECK-PPC: call void @_mcount() } -- cgit v1.2.3