Remove support for DIVariable's FlagIndirectVariable and expect
[oota-llvm.git] / include / llvm / CodeGen / RegAllocPBQP.h
index 635fa9d92126487cb29f250c4de1d20c7dd931ea..eceb790c547d027e59735903c7c367c051de0601 100644 (file)
@@ -17,9 +17,9 @@
 #define LLVM_CODEGEN_REGALLOCPBQP_H
 
 #include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/CodeGen/PBQPRAConstraint.h"
 #include "llvm/CodeGen/PBQP/CostAllocator.h"
 #include "llvm/CodeGen/PBQP/ReductionRules.h"
+#include "llvm/CodeGen/PBQPRAConstraint.h"
 #include "llvm/Support/ErrorHandling.h"
 
 namespace llvm {
@@ -137,7 +137,7 @@ private:
   typedef ValuePool<AllowedRegVector> AllowedRegVecPool;
 public:
 
-  typedef typename AllowedRegVecPool::PoolRef AllowedRegVecRef;
+  typedef AllowedRegVecPool::PoolRef AllowedRegVecRef;
 
   GraphMetadata(MachineFunction &MF,
                 LiveIntervals &LIS,
@@ -175,7 +175,7 @@ private:
 /// \brief Holds solver state and other metadata relevant to each PBQP RA node.
 class NodeMetadata {
 public:
-  typedef AllowedRegVector AllowedRegVector;
+  typedef RegAlloc::AllowedRegVector AllowedRegVector;
 
   typedef enum { Unprocessed,
                  OptimallyReducible,
@@ -192,8 +192,10 @@ public:
     : RS(Other.RS), NumOpts(Other.NumOpts), DeniedOpts(Other.DeniedOpts),
       OptUnsafeEdges(new unsigned[NumOpts]), VReg(Other.VReg),
       AllowedRegs(Other.AllowedRegs) {
-    std::copy(&Other.OptUnsafeEdges[0], &Other.OptUnsafeEdges[NumOpts],
-              &OptUnsafeEdges[0]);
+    if (NumOpts > 0) {
+      std::copy(&Other.OptUnsafeEdges[0], &Other.OptUnsafeEdges[NumOpts],
+                &OptUnsafeEdges[0]);
+    }
   }
 
   // FIXME: Re-implementing default behavior to work around MSVC. Remove once