From 60d9845f6a037122d9be9a6d92d4de617ef45b04 Mon Sep 17 00:00:00 2001
From: Mehdi Amini <mehdi.amini@apple.com>
Date: Fri, 11 Mar 2016 18:48:02 +0000
Subject: [PATCH] Fix clang crash: when CodeGenAction is initialized without a
 context, use the member and not the parameter

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263273 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/CodeGen/CodeGenAction.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp
index 67945cdb901..5e939accdba 100644
--- a/lib/CodeGen/CodeGenAction.cpp
+++ b/lib/CodeGen/CodeGenAction.cpp
@@ -660,7 +660,7 @@ CodeGenAction::CodeGenAction(unsigned _Act, LLVMContext *_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);
+  VMContext->setDiscardValueNames(true);
 #endif
 }
 
-- 
GitLab