[llvm] r212595 - SourceMgr: consistently use 'unsigned' for the memory buffer ID type
Dmitri Gribenko
gribozavr at gmail.com
Wed Jul 9 01:30:15 PDT 2014
Author: gribozavr
Date: Wed Jul 9 03:30:15 2014
New Revision: 212595
URL: http://llvm.org/viewvc/llvm-project?rev=212595&view=rev
Log:
SourceMgr: consistently use 'unsigned' for the memory buffer ID type
Modified:
llvm/trunk/include/llvm/Support/SourceMgr.h
llvm/trunk/lib/Support/SourceMgr.cpp
Modified: llvm/trunk/include/llvm/Support/SourceMgr.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/SourceMgr.h?rev=212595&r1=212594&r2=212595&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/SourceMgr.h (original)
+++ llvm/trunk/include/llvm/Support/SourceMgr.h Wed Jul 9 03:30:15 2014
@@ -99,7 +99,7 @@ public:
return Buffers[i - 1].Buffer;
}
- size_t getNumBuffers() const {
+ unsigned getNumBuffers() const {
return Buffers.size();
}
@@ -115,7 +115,7 @@ public:
/// Add a new source buffer to this source manager. This takes ownership of
/// the memory buffer.
- size_t AddNewSourceBuffer(MemoryBuffer *F, SMLoc IncludeLoc) {
+ unsigned AddNewSourceBuffer(MemoryBuffer *F, SMLoc IncludeLoc) {
SrcBuffer NB;
NB.Buffer = F;
NB.IncludeLoc = IncludeLoc;
@@ -129,8 +129,8 @@ public:
/// If no file is found, this returns 0, otherwise it returns the buffer ID
/// of the stacked file. The full path to the included file can be found in
/// \p IncludedFile.
- size_t AddIncludeFile(const std::string &Filename, SMLoc IncludeLoc,
- std::string &IncludedFile);
+ unsigned AddIncludeFile(const std::string &Filename, SMLoc IncludeLoc,
+ std::string &IncludedFile);
/// Return the ID of the buffer containing the specified location.
///
Modified: llvm/trunk/lib/Support/SourceMgr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SourceMgr.cpp?rev=212595&r1=212594&r2=212595&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SourceMgr.cpp (original)
+++ llvm/trunk/lib/Support/SourceMgr.cpp Wed Jul 9 03:30:15 2014
@@ -49,9 +49,9 @@ SourceMgr::~SourceMgr() {
}
}
-size_t SourceMgr::AddIncludeFile(const std::string &Filename,
- SMLoc IncludeLoc,
- std::string &IncludedFile) {
+unsigned SourceMgr::AddIncludeFile(const std::string &Filename,
+ SMLoc IncludeLoc,
+ std::string &IncludedFile) {
IncludedFile = Filename;
ErrorOr<std::unique_ptr<MemoryBuffer>> NewBufOrErr =
MemoryBuffer::getFile(IncludedFile.c_str());
More information about the llvm-commits
mailing list