diff options
author | Duncan Sands <baldrick@free.fr> | 2008-01-08 10:06:15 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-01-08 10:06:15 +0000 |
commit | dfd9458dce73f93166f8e24cfe5c9e331779b934 (patch) | |
tree | 3b5a8fa1bac3750830cc98409f31c3a225995848 /lib/Target/X86/X86Subtarget.cpp | |
parent | 7c1626487614decfca94d042e97c8000a3bf5cff (diff) | |
download | external_llvm-dfd9458dce73f93166f8e24cfe5c9e331779b934.zip external_llvm-dfd9458dce73f93166f8e24cfe5c9e331779b934.tar.gz external_llvm-dfd9458dce73f93166f8e24cfe5c9e331779b934.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 7b686ed..6efe540 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; |