[llvm] 57a0e0d - Fix 2: [DebugInfo] Support DIArgList in DbgVariableIntrinsic
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 8 07:45:30 PST 2021
Author: Stephen Tozer
Date: 2021-03-08T15:43:39Z
New Revision: 57a0e0d4c2a1c83f8c0d50b893616220d1167e00
URL: https://github.com/llvm/llvm-project/commit/57a0e0d4c2a1c83f8c0d50b893616220d1167e00
DIFF: https://github.com/llvm/llvm-project/commit/57a0e0d4c2a1c83f8c0d50b893616220d1167e00.diff
LOG: Fix 2: [DebugInfo] Support DIArgList in DbgVariableIntrinsic
Changes to function calls in LocalTest resulted in comparisons between
unsigned values and signed literals; the latter have been updated to be
unsigned to prevent this warning.
Added:
Modified:
llvm/unittests/Transforms/Utils/LocalTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/Transforms/Utils/LocalTest.cpp b/llvm/unittests/Transforms/Utils/LocalTest.cpp
index f2fce5e7d55d..720472dc24d3 100644
--- a/llvm/unittests/Transforms/Utils/LocalTest.cpp
+++ b/llvm/unittests/Transforms/Utils/LocalTest.cpp
@@ -524,7 +524,7 @@ struct SalvageDebugInfoTest : ::testing::Test {
}
bool doesDebugValueDescribeX(const DbgValueInst &DI) {
- if (DI.getNumVariableLocationOps() != 1)
+ if (DI.getNumVariableLocationOps() != 1u)
return false;
const auto &CI = *cast<ConstantInt>(DI.getValue(0));
if (CI.isZero())
@@ -536,7 +536,7 @@ struct SalvageDebugInfoTest : ::testing::Test {
}
bool doesDebugValueDescribeY(const DbgValueInst &DI) {
- if (DI.getNumVariableLocationOps() != 1)
+ if (DI.getNumVariableLocationOps() != 1u)
return false;
const auto &CI = *cast<ConstantInt>(DI.getVariableLocationOp(0));
if (CI.isZero())
@@ -762,14 +762,14 @@ TEST(Local, ReplaceAllDbgUsesWith) {
EXPECT_TRUE(replaceAllDbgUsesWith(A, F_, F_, DT));
auto *ADbgVal = cast<DbgValueInst>(A.getNextNode());
- EXPECT_EQ(ADbgVal->getNumVariableLocationOps(), 1);
+ EXPECT_EQ(ADbgVal->getNumVariableLocationOps(), 1u);
EXPECT_EQ(ConstantInt::get(A.getType(), 0), ADbgVal->getVariableLocationOp(0));
// Introduce a use-before-def. Check that the dbg.values for %f become undef.
EXPECT_TRUE(replaceAllDbgUsesWith(F_, G, G, DT));
auto *FDbgVal = cast<DbgValueInst>(F_.getNextNode());
- EXPECT_EQ(FDbgVal->getNumVariableLocationOps(), 1);
+ EXPECT_EQ(FDbgVal->getNumVariableLocationOps(), 1u);
EXPECT_TRUE(FDbgVal->isUndef());
SmallVector<DbgValueInst *, 1> FDbgVals;
More information about the llvm-commits
mailing list