aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/SourceMgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r--include/llvm/Support/SourceMgr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h
index 25775cb744..4170c8d6dc 100644
--- a/include/llvm/Support/SourceMgr.h
+++ b/include/llvm/Support/SourceMgr.h
@@ -30,6 +30,8 @@ public:
SMLoc() : Ptr(0) {}
SMLoc(const SMLoc &RHS) : Ptr(RHS.Ptr) {}
+ bool isValid() const { return Ptr != 0; }
+
bool operator==(const SMLoc &RHS) const { return RHS.Ptr == Ptr; }
bool operator!=(const SMLoc &RHS) const { return RHS.Ptr != Ptr; }