diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp
index 0b76581d64bcda80c1548675bcd0d0badc9f9fe3..67945cdb9013e59f93e6020aa914cd66fe6006d2 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
 }