From e51775dc5e3503092313fe77174127f4f4d17374 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 8 Jan 2008 10:06:15 +0000 Subject: Use size_t to store Pos, avoid truncating value on 64-bit builds. Analysis and original patch by Török Edwin. Code audit found another place with the same problem, also fixed here. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45746 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCSubtarget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Target/PowerPC/PPCSubtarget.cpp') diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp index 0a1e6a7837..dff53baa16 100644 --- a/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/lib/Target/PowerPC/PPCSubtarget.cpp @@ -103,7 +103,7 @@ PPCSubtarget::PPCSubtarget(const TargetMachine &tm, const Module &M, const std::string &TT = M.getTargetTriple(); if (TT.length() > 7) { // Determine which version of darwin this is. - unsigned DarwinPos = TT.find("-darwin"); + size_t DarwinPos = TT.find("-darwin"); if (DarwinPos != std::string::npos) { if (isdigit(TT[DarwinPos+7])) DarwinVers = atoi(&TT[DarwinPos+7]); -- cgit v1.2.3-18-g5258