Skip to content

Commit

Permalink
Silence MSVC error C2398
Browse files Browse the repository at this point in the history
Reported by http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/6000/steps/build-unified-tree/logs/stdio
The error messages were all similar to:
llvm\unittests\CodeGen\GlobalISel\LegalizerInfoTest.cpp(54): error C2398: Element '1': conversion from '' to 'unsigned int' requires a narrowing conversion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317578 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
kbeyls committed Nov 7, 2017
1 parent 25ff19d commit d142ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TEST(LegalizerInfoTest, ScalarRISC) {
using namespace TargetOpcode;
LegalizerInfo L;
// Typical RISCy set of operations based on AArch64.
for (auto Op : {G_ADD, G_SUB}) {
for (unsigned Op : {G_ADD, G_SUB}) {
for (unsigned Size : {32, 64})
L.setAction({Op, 0, LLT::scalar(Size)}, LegalizerInfo::Legal);
L.setLegalizeScalarToDifferentSizeStrategy(
Expand All @@ -58,7 +58,7 @@ TEST(LegalizerInfoTest, ScalarRISC) {

L.computeTables();

for (auto &opcode : {G_ADD, G_SUB}) {
for (unsigned opcode : {G_ADD, G_SUB}) {
// Check we infer the correct types and actually do what we're told.
ASSERT_EQ(L.getAction({opcode, LLT::scalar(8)}),
std::make_pair(LegalizerInfo::WidenScalar, LLT::scalar(32)));
Expand Down

0 comments on commit d142ab1

Please sign in to comment.