Add method
[oota-llvm.git] / include / llvm / Use.h
index a0f920d2e55adf8a3755d3492900252b7011ab34..88b723bfc3a61ab16dde0490d08404fac6972a81 100644 (file)
@@ -1,4 +1,11 @@
 //===-- llvm/Use.h - Definition of the Use class ----------------*- C++ -*-===//
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
 //
 // This defines the Use class.  The Use class represents the operand of an
 // instruction or some other User instance which refers to a Value.  The Use
@@ -9,7 +16,10 @@
 #ifndef LLVM_USE_H
 #define LLVM_USE_H
 
-#include "Support/ilist"
+#include "llvm/ADT/ilist"
+
+namespace llvm {
+
 template<typename NodeTy> struct ilist_traits;
 class Value;
 class User;
@@ -25,7 +35,7 @@ class Use {
   Value *Val;
   User *U;
   Use *Prev, *Next;
-  friend class ilist_traits<Use>;
+  friend struct ilist_traits<Use>;
 public:
   inline Use(Value *v, User *user);
   inline Use(const Use &u);
@@ -73,13 +83,13 @@ struct ilist_traits<Use> {
 template<> struct simplify_type<Use> {
   typedef Value* SimpleType;
   static SimpleType getSimplifiedValue(const Use &Val) {
-    return (SimpleType)Val.get();
+    return static_cast<SimpleType>(Val.get());
   }
 };
 template<> struct simplify_type<const Use> {
   typedef Value* SimpleType;
   static SimpleType getSimplifiedValue(const Use &Val) {
-    return (SimpleType)Val.get();
+    return static_cast<SimpleType>(Val.get());
   }
 };
 
@@ -143,4 +153,6 @@ struct UseListConstIteratorWrapper : public iplist<Use>::const_iterator {
   }
 };
 
+} // End llvm namespace
+
 #endif