SROA: Silence unused variable warnings in Release builds.

The NDEBUG hack is ugly, but I see no better solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163900 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/SROA.cpp b/lib/Transforms/Scalar/SROA.cpp
index 8c999bc..9dcf12d 100644
--- a/lib/Transforms/Scalar/SROA.cpp
+++ b/lib/Transforms/Scalar/SROA.cpp
@@ -303,8 +303,10 @@
   class UseBuilder;
   friend class AllocaPartitioning::UseBuilder;
 
+#ifndef NDEBUG
   /// \brief Handle to alloca instruction to simplify method interfaces.
   AllocaInst &AI;
+#endif
 
   /// \brief The instruction responsible for this alloca having no partitioning.
   ///
@@ -988,7 +990,11 @@
 }
 
 AllocaPartitioning::AllocaPartitioning(const TargetData &TD, AllocaInst &AI)
-    : AI(AI), PointerEscapingInstr(0) {
+    :
+#ifndef NDEBUG
+      AI(AI),
+#endif
+      PointerEscapingInstr(0) {
   PartitionBuilder PB(TD, AI, *this);
   if (!PB())
     return;
@@ -1906,6 +1912,7 @@
       uint64_t OrigEnd = IsDest ? MTO.DestEnd : MTO.SourceEnd;
       // Ensure the start lines up.
       assert(BeginOffset == OrigBegin);
+      (void)OrigBegin;
 
       // Rewrite the size as needed.
       if (EndOffset != OrigEnd)