From e51775dc5e3503092313fe77174127f4f4d17374 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Tue, 8 Jan 2008 10:06:15 +0000 Subject: [PATCH] =?utf8?q?Use=20size=5Ft=20to=20store=20Pos,=20avoid=20tru?= =?utf8?q?ncating=20value=20on=2064-bit=20builds.=20=20Analysis=20and=20or?= =?utf8?q?iginal=20patch=20by=20T=C3=B6r=C3=B6k=20Edwin.=20=20Code=20audit?= =?utf8?q?=20found=20another=20place=20with=20the=20same=20problem,=20also?= =?utf8?q?=20fixed=20here.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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 +- lib/Target/X86/X86Subtarget.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Target/PowerPC/PPCSubtarget.cpp b/lib/Target/PowerPC/PPCSubtarget.cpp index 0a1e6a78371..dff53baa16b 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]); diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 7b686edef31..6efe540fabd 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -257,7 +257,7 @@ X86Subtarget::X86Subtarget(const Module &M, const std::string &FS, bool is64Bit) // if one cannot be determined, to true. const std::string& TT = M.getTargetTriple(); if (TT.length() > 5) { - unsigned Pos; + size_t Pos; if ((Pos = TT.find("-darwin")) != std::string::npos) { TargetType = isDarwin; -- 2.34.1