[DebugInfo] Correct the assertion introduced in r266509 + update test.
llvm-svn: 266512
diff --git a/llvm/unittests/IR/MetadataTest.cpp b/llvm/unittests/IR/MetadataTest.cpp
index 1159616..1addd15 100644
--- a/llvm/unittests/IR/MetadataTest.cpp
+++ b/llvm/unittests/IR/MetadataTest.cpp
@@ -1817,6 +1817,7 @@
DITypeRef Type = getDerivedType();
unsigned Arg = 6;
unsigned Flags = 7;
+ unsigned NotFlags = (~Flags) & ((1 << 16) - 1);
auto *N =
DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg, Flags);
@@ -1847,7 +1848,7 @@
EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type,
Arg + 1, Flags));
EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg,
- ~Flags));
+ NotFlags));
TempDILocalVariable Temp = N->clone();
EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));