projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0faea04
)
Add SMLoc::isValid method.
author
Daniel Dunbar
<daniel@zuster.org>
Mon, 29 Jun 2009 23:28:55 +0000
(23:28 +0000)
committer
Daniel Dunbar
<daniel@zuster.org>
Mon, 29 Jun 2009 23:28:55 +0000
(23:28 +0000)
- To support using SMLoc as a sentinel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74474
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/SourceMgr.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/SourceMgr.h
b/include/llvm/Support/SourceMgr.h
index 25775cb74419d514201fa16d43071a11e83e747e..4170c8d6dc6495fdceea342055996d602e58f308 100644
(file)
--- 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; }