[llvm] r330614 - Fix -Wtautological-compare warning with npos on Windows
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 23 09:47:27 PDT 2018
Author: rnk
Date: Mon Apr 23 09:47:27 2018
New Revision: 330614
URL: http://llvm.org/viewvc/llvm-project?rev=330614&view=rev
Log:
Fix -Wtautological-compare warning with npos on Windows
Modified:
llvm/trunk/lib/IR/AutoUpgrade.cpp
Modified: llvm/trunk/lib/IR/AutoUpgrade.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AutoUpgrade.cpp?rev=330614&r1=330613&r2=330614&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AutoUpgrade.cpp (original)
+++ llvm/trunk/lib/IR/AutoUpgrade.cpp Mon Apr 23 09:47:27 2018
@@ -1255,8 +1255,7 @@ static bool upgradeAVX512MaskToSelect(St
/// Upgrade comment in call to inline asm that represents an objc retain release
/// marker.
void llvm::UpgradeInlineAsmString(std::string *AsmStr) {
-
- unsigned long Pos;
+ size_t Pos;
if (AsmStr->find("mov\tfp") == 0 &&
AsmStr->find("objc_retainAutoreleaseReturnValue") != std::string::npos &&
(Pos = AsmStr->find("# marker")) != std::string::npos) {
More information about the llvm-commits
mailing list