In isUIntN, make sure N is less than 64 before using in a shift to avoid undefined...
[oota-llvm.git] / include / llvm / Support / SMLoc.h
index 2b0e9dfff711392b12ab5ff3ba558d9c5c0e85ce..c6e9a14e82ac69966534f9958ca3aa73e8f2727c 100644 (file)
@@ -12,8 +12,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef SUPPORT_SMLOC_H
-#define SUPPORT_SMLOC_H
+#ifndef LLVM_SUPPORT_SMLOC_H
+#define LLVM_SUPPORT_SMLOC_H
 
 #include <cassert>
 
@@ -22,10 +22,11 @@ namespace llvm {
 /// Represents a location in source code.
 class SMLoc {
   const char *Ptr;
+
 public:
-  SMLoc() : Ptr(0) {}
+  SMLoc() : Ptr(nullptr) {}
 
-  bool isValid() const { return Ptr != 0; }
+  bool isValid() const { return Ptr != nullptr; }
 
   bool operator==(const SMLoc &RHS) const { return RHS.Ptr == Ptr; }
   bool operator!=(const SMLoc &RHS) const { return RHS.Ptr != Ptr; }
@@ -53,11 +54,10 @@ public:
     assert(Start.isValid() == End.isValid() &&
            "Start and end should either both be valid or both be invalid!");
   }
-  
+
   bool isValid() const { return Start.isValid(); }
 };
-  
+
 } // end namespace llvm
 
 #endif
-