diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2014-07-09 08:30:15 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2014-07-09 08:30:15 +0000 |
commit | a5b27a7128a7bc6a1b746540dd4c493109db3039 (patch) | |
tree | c6dfa895d11e39b6293c8cdb6bedb4892f47e9bc | |
parent | 7fe6a181412562796af5d9cc500995856315274c (diff) | |
download | bcm5719-llvm-a5b27a7128a7bc6a1b746540dd4c493109db3039.tar.gz bcm5719-llvm-a5b27a7128a7bc6a1b746540dd4c493109db3039.zip |
SourceMgr: consistently use 'unsigned' for the memory buffer ID type
llvm-svn: 212595
-rw-r--r-- | llvm/include/llvm/Support/SourceMgr.h | 8 | ||||
-rw-r--r-- | llvm/lib/Support/SourceMgr.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/include/llvm/Support/SourceMgr.h b/llvm/include/llvm/Support/SourceMgr.h index 104b6962c76..4717553bd0d 100644 --- a/llvm/include/llvm/Support/SourceMgr.h +++ b/llvm/include/llvm/Support/SourceMgr.h @@ -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. /// diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp index 595c6eec110..003cb56e6cb 100644 --- a/llvm/lib/Support/SourceMgr.cpp +++ b/llvm/lib/Support/SourceMgr.cpp @@ -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()); |