[PATCH] Add small text file reader facility.
Diego Novillo
dnovillo at google.com
Tue Dec 10 06:47:00 PST 2013
Remove unrelated changes.
The previous update snuck in changes belonging to other revisions
(still trying to get a handle on arcanist).
Hi chandlerc,
http://llvm-reviews.chandlerc.com/D2294
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D2294?vs=6002&id=6003#toc
Files:
include/llvm/Support/FileUtilities.h
Index: include/llvm/Support/FileUtilities.h
===================================================================
--- include/llvm/Support/FileUtilities.h
+++ include/llvm/Support/FileUtilities.h
@@ -96,39 +96,39 @@
public:
/// \brief Read the file into the internal MemoryBuffer and get to its
/// first line.
- static inline FileReader begin(Twine F, const char Marker = '\0') {
+ static FileReader begin(Twine F, const char Marker = '\0') {
FileReader FR(F, Marker);
FR.openFile();
++FR;
return FR;
}
/// \brief Initialize the iterator at the end of the file.
- static inline FileReader end(Twine F) { return FileReader(F, '\0'); }
+ static FileReader end(Twine F) { return FileReader(F, '\0'); }
/// \brief Return true if this iterator is the same as the given one.
- inline bool operator==(const FileReader &FR) const {
+ bool operator==(const FileReader &FR) const {
return FR.Filename == Filename && FR.FP == FR.FP;
}
/// \brief Return true if this iterator is different than the
/// given one.
- inline bool operator!=(const FileReader &FR) const {
+ bool operator!=(const FileReader &FR) const {
return !operator==(FR);
}
/// \brief Advance the iterator to the next non-comment line in the file.
- inline FileReader &operator++() {
+ FileReader &operator++() {
do
readLine();
while (CommentMarker && !atEOF() && CurrentLine[0] == CommentMarker);
return *this;
}
/// \brief Return the contents of the line currently pointed by
/// the iterator.
- inline const StringRef operator*() const { return CurrentLine; }
- inline StringRef operator*() { return CurrentLine; }
+ const StringRef operator*() const { return CurrentLine; }
+ StringRef operator*() { return CurrentLine; }
/// \brief Return true, if we've reached EOF.
bool atEOF() const { return FP == NULL; }
@@ -141,7 +141,7 @@
private:
- inline FileReader(Twine F, const char Marker)
+ FileReader(Twine F, const char Marker)
: Buffer(NULL),
FP(NULL),
LineNumber(-1),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2294.6.patch
Type: text/x-patch
Size: 2172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131210/eb91b90a/attachment.bin>
More information about the llvm-commits
mailing list