aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/SourceMgr.h
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-05-05 00:40:33 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-05-05 00:40:33 +0000
commit5c332dbd30d9398ed25b30c3080506f7b8e92290 (patch)
tree66a85762d2b59de508d5c89f88e85887ed4b972b /include/llvm/Support/SourceMgr.h
parent76be9bf67eaa4cb07b690c591a730c0689f5ec77 (diff)
Add ArrayRef constructor from None, and do the cleanups that this constructor enables
Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r--include/llvm/Support/SourceMgr.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h
index 02abf92daa..d67914a1b8 100644
--- a/include/llvm/Support/SourceMgr.h
+++ b/include/llvm/Support/SourceMgr.h
@@ -145,8 +145,8 @@ public:
/// @param ShowColors - Display colored messages if output is a terminal and
/// the default error handler is used.
void PrintMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg,
- ArrayRef<SMRange> Ranges = ArrayRef<SMRange>(),
- ArrayRef<SMFixIt> FixIts = ArrayRef<SMFixIt>(),
+ ArrayRef<SMRange> Ranges = None,
+ ArrayRef<SMFixIt> FixIts = None,
bool ShowColors = true) const;
@@ -155,9 +155,9 @@ public:
///
/// @param Msg If non-null, the kind of message (e.g., "error") which is
/// prefixed to the message.
- SMDiagnostic GetMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg,
- ArrayRef<SMRange> Ranges = ArrayRef<SMRange>(),
- ArrayRef<SMFixIt> FixIts = ArrayRef<SMFixIt>()) const;
+ SMDiagnostic GetMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg,
+ ArrayRef<SMRange> Ranges = None,
+ ArrayRef<SMFixIt> FixIts = None) const;
/// PrintIncludeStack - Prints the names of included files and the line of the
/// file they were included from. A diagnostic handler can use this before
@@ -227,7 +227,7 @@ public:
int Line, int Col, SourceMgr::DiagKind Kind,
StringRef Msg, StringRef LineStr,
ArrayRef<std::pair<unsigned,unsigned> > Ranges,
- ArrayRef<SMFixIt> FixIts = ArrayRef<SMFixIt>());
+ ArrayRef<SMFixIt> FixIts = None);
const SourceMgr *getSourceMgr() const { return SM; }
SMLoc getLoc() const { return Loc; }