/// 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; }
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
-