summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-03-11 17:15:44 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-03-11 17:15:44 +0000
commite803fc3276c24d7abe35204ec8e9b252872684e3 (patch)
tree6199aa5777bc657e52b3b23bc36ddd1b5c610662 /clang/lib/CodeGen/CodeGenAction.cpp
parent1e9c9251824e9fee549d49bf10388fa996fab10c (diff)
downloadbcm5719-llvm-e803fc3276c24d7abe35204ec8e9b252872684e3.tar.gz
bcm5719-llvm-e803fc3276c24d7abe35204ec8e9b252872684e3.zip
Remove compile time PreserveName switch based on NDEBUG
Summary: Following r263086, we are now relying on a flag on the Context to discard Value names in release builds. Reviewers: chandlerc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18024 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 263257
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 638f79a2452..0b76581d64b 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -656,7 +656,13 @@ void BackendConsumer::DiagnosticHandlerImpl(const DiagnosticInfo &DI) {
CodeGenAction::CodeGenAction(unsigned _Act, LLVMContext *_VMContext)
: Act(_Act), VMContext(_VMContext ? _VMContext : new LLVMContext),
- OwnsVMContext(!_VMContext) {}
+ OwnsVMContext(!_VMContext) {
+#ifdef NDEBUG
+ // FIXME: change this to be controlled by a cc1 flag that the driver passes,
+ // on the model of --disable-free
+ _VMContext.setDiscardValueNames(true);
+#endif
+}
CodeGenAction::~CodeGenAction() {
TheModule.reset();
OpenPOWER on IntegriCloud