mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-26 06:48:51 -04:00

(Re-apply patch after bug fixing) This diff makes sure that the driver does not pass -fomit-frame-pointer or -momit-leaf-frame-pointer to the frontend when -pg is used. Currently, clang gives an error if -fomit-frame-pointer is used in combination with -pg, but -momit-leaf-frame-pointer was forgotten. Also, disable frame pointer elimination in the frontend when -pg is set. Patch by Stefan Kempf. llvm-svn: 253886
15 lines
379 B
C
15 lines
379 B
C
// REQUIRES: x86-registered-target
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O3 -pg -S -o - %s | \
|
|
// RUN: FileCheck %s
|
|
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O3 -momit-leaf-frame-pointer -pg -S -o - %s | \
|
|
// RUN: FileCheck %s
|
|
|
|
// Test that the frame pointer is kept when compiling with
|
|
// profiling.
|
|
|
|
//CHECK: pushq %rbp
|
|
int main(void)
|
|
{
|
|
return 0;
|
|
}
|