diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-03-13 21:05:23 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-03-13 21:05:23 +0000 |
commit | 557c20a886d941ef830437d631b575c0c584586b (patch) | |
tree | 7dc25538b5d62864e222dda4e2523591945c8a1e /clang/lib/Driver/Tools.cpp | |
parent | ba9fba81d633688eda342280580b8e2771b2ccc9 (diff) | |
download | llvm-557c20a886d941ef830437d631b575c0c584586b.zip llvm-557c20a886d941ef830437d631b575c0c584586b.tar.gz llvm-557c20a886d941ef830437d631b575c0c584586b.tar.bz2 |
Remove compile time PreserveName in favor of a runtime cc1 -discard-value-names option
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
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 72e7caa..f51e1f6 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -3712,6 +3712,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Disable the verification pass in -asserts builds. #ifdef NDEBUG CmdArgs.push_back("-disable-llvm-verifier"); + // Discard LLVM value names in -asserts builds. + CmdArgs.push_back("-discard-value-names"); #endif // Set the main file name, so that debug info works even with |