Merging the linear scan register allocator in trunk. It currently passes most tests...
[oota-llvm.git] / include / llvm / GlobalValue.h
index 6177db5cd1c0619582b0e5b16694bdf6eb78e685..942d9b9a4081ded2b6e951a24dfbea4943ba8d43 100644 (file)
@@ -1,4 +1,11 @@
 //===-- llvm/GlobalValue.h - Class to represent a global value --*- 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 file is a common base class of all globally definable objects.  As such,
 // it is subclassed by GlobalVariable and by Function.  This is used because you
@@ -11,6 +18,9 @@
 #define LLVM_GLOBALVALUE_H
 
 #include "llvm/User.h"
+
+namespace llvm {
+
 class PointerType;
 class Module;
 
@@ -36,7 +46,7 @@ public:
 
   /// getType - Global values are always pointers.
   inline const PointerType *getType() const {
-    return (const PointerType*)User::getType();
+    return reinterpret_cast<const PointerType*>(User::getType());
   }
 
   bool hasExternalLinkage()  const { return Linkage == ExternalLinkage; }
@@ -64,4 +74,6 @@ public:
   }
 };
 
+} // End llvm namespace
+
 #endif