diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-07-20 00:20:10 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2013-07-20 00:20:10 +0000 |
commit | ac9e819ca9ad93cfbcf0b7c5b0a7cbbd34cd9176 (patch) | |
tree | 49acd0c1eb309352a9b1ba8fa992f576fff7b5d0 /include/llvm/Support/SourceMgr.h | |
parent | 7b61a701932d850d2777fafda1fea5ec841d893b (diff) | |
download | llvm-ac9e819ca9ad93cfbcf0b7c5b0a7cbbd34cd9176.tar.gz llvm-ac9e819ca9ad93cfbcf0b7c5b0a7cbbd34cd9176.tar.bz2 llvm-ac9e819ca9ad93cfbcf0b7c5b0a7cbbd34cd9176.tar.xz |
Fix size_t -> uint warnings with MSVC 64-bit build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/SourceMgr.h')
-rw-r--r-- | include/llvm/Support/SourceMgr.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Support/SourceMgr.h b/include/llvm/Support/SourceMgr.h index d67914a1b8..5b33d42f9e 100644 --- a/include/llvm/Support/SourceMgr.h +++ b/include/llvm/Support/SourceMgr.h @@ -39,7 +39,7 @@ public: DK_Warning, DK_Note }; - + /// DiagHandlerTy - Clients that want to handle their own diagnostics in a /// custom way can register a function pointer+context as a diagnostic /// handler. It gets called each time PrintMessage is invoked. @@ -98,7 +98,7 @@ public: return Buffers[i].Buffer; } - unsigned getNumBuffers() const { + size_t getNumBuffers() const { return Buffers.size(); } @@ -109,20 +109,20 @@ public: /// AddNewSourceBuffer - Add a new source buffer to this source manager. This /// takes ownership of the memory buffer. - unsigned AddNewSourceBuffer(MemoryBuffer *F, SMLoc IncludeLoc) { + size_t AddNewSourceBuffer(MemoryBuffer *F, SMLoc IncludeLoc) { SrcBuffer NB; NB.Buffer = F; NB.IncludeLoc = IncludeLoc; Buffers.push_back(NB); - return Buffers.size()-1; + return Buffers.size() - 1; } /// AddIncludeFile - Search for a file with the specified name in the current /// directory or in one of the IncludeDirs. 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 IncludedFile. - unsigned AddIncludeFile(const std::string &Filename, SMLoc IncludeLoc, - std::string &IncludedFile); + size_t AddIncludeFile(const std::string &Filename, SMLoc IncludeLoc, + std::string &IncludedFile); /// FindBufferContainingLoc - Return the ID of the buffer containing the /// specified location, returning -1 if not found. @@ -221,7 +221,7 @@ public: SMDiagnostic(StringRef filename, SourceMgr::DiagKind Knd, StringRef Msg) : SM(0), Filename(filename), LineNo(-1), ColumnNo(-1), Kind(Knd), Message(Msg) {} - + // Diagnostic with a location. SMDiagnostic(const SourceMgr &sm, SMLoc L, StringRef FN, int Line, int Col, SourceMgr::DiagKind Kind, |