mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 21:26:05 +00:00

Summary: This flag is enabled by default in the driver when NDEBUG is set. It is forwarded on the LLVMContext to discard all value names (but GlobalValue) for performance purpose. This an improved version of D18024 Reviewers: echristo, chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18127 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263394
11 lines
352 B
C++
11 lines
352 B
C++
// RUN: %clang_cc1 -emit-llvm -triple=armv7-apple-darwin -emit-llvm -std=c++11 %s -o - -O1 | FileCheck %s
|
|
// RUN: %clang_cc1 -emit-llvm -triple=armv7-apple-darwin -emit-llvm -std=c++11 %s -o - -O1 -discard-value-names | FileCheck %s --check-prefix=DISCARDVALUE
|
|
|
|
int foo(int bar) {
|
|
return bar;
|
|
}
|
|
|
|
// CHECK: ret i32 %bar
|
|
// DISCARDVALUE: ret i32 %0
|
|
|