Fix an off by one error while accessing complex address element of a DIVariable.
[oota-llvm.git] / include / llvm / Instruction.h
index 13331e60ed2faca7192194b70edbca7eaf5226c5..89bb9fdf423d5f3f92f62be44957c21209f8459a 100644 (file)
@@ -32,7 +32,7 @@ class Instruction : public User, public ilist_node<Instruction> {
   Instruction(const Instruction &);        // Do not implement
 
   BasicBlock *Parent;
-  NewDebugLoc DbgLoc;                      // 'dbg' Metadata cache.
+  DebugLoc DbgLoc;                         // 'dbg' Metadata cache.
   
   enum {
     /// HasMetadataBit - This is a bit stored in the SubClassData field which
@@ -170,21 +170,11 @@ public:
   void setMetadata(unsigned KindID, MDNode *Node);
   void setMetadata(const char *Kind, MDNode *Node);
 
-  /// setDbgMetadata - This is just an optimized helper function that is
-  /// equivalent to setMetadata("dbg", Node);
-  void setDbgMetadata(MDNode *Node);
-  
-  /// getDbgMetadata - This is just an optimized helper function that is
-  /// equivalent to calling getMetadata("dbg").
-  MDNode *getDbgMetadata() const {
-    return DbgLoc.getAsMDNode(getContext());
-  }
-
   /// setDebugLoc - Set the debug location information for this instruction.
-  void setDebugLoc(const NewDebugLoc &Loc) { DbgLoc = Loc; }
+  void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; }
   
   /// getDebugLoc - Return the debug location for this node as a DebugLoc.
-  const NewDebugLoc &getDebugLoc() const { return DbgLoc; }
+  const DebugLoc &getDebugLoc() const { return DbgLoc; }
   
 private:
   /// hasMetadataHashEntry - Return true if we have an entry in the on-the-side
@@ -199,7 +189,7 @@ private:
   void getAllMetadataImpl(SmallVectorImpl<std::pair<unsigned,MDNode*> > &)const;
   void getAllMetadataOtherThanDebugLocImpl(SmallVectorImpl<std::pair<unsigned,
                                            MDNode*> > &) const;
-  void removeAllMetadata();
+  void clearMetadataHashEntries();
 public:
   //===--------------------------------------------------------------------===//
   // Predicates and helper methods.
@@ -210,11 +200,10 @@ public:
   ///
   ///   Associative operators satisfy:  x op (y op z) === (x op y) op z
   ///
-  /// In LLVM, the Add, Mul, And, Or, and Xor operators are associative, when
-  /// not applied to floating point types.
+  /// In LLVM, the Add, Mul, And, Or, and Xor operators are associative.
   ///
-  bool isAssociative() const { return isAssociative(getOpcode(), getType()); }
-  static bool isAssociative(unsigned op, const Type *Ty);
+  bool isAssociative() const { return isAssociative(getOpcode()); }
+  static bool isAssociative(unsigned op);
 
   /// isCommutative - Return true if the instruction is commutative:
   ///