diff options
author | Davide Italiano <davide@freebsd.org> | 2016-04-16 03:23:48 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2016-04-16 03:23:48 +0000 |
commit | 30f743e3049399863a3192bd7b48d01cc739e787 (patch) | |
tree | 6c4a0148c0ca50d9f950290bd48761a6e6269ef9 /unittests/IR/MetadataTest.cpp | |
parent | 1f0361995907d9ad05e16ad5927e7919cb044315 (diff) |
[DebugInfo] Correct the assertion introduced in r266509 + update test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR/MetadataTest.cpp')
-rw-r--r-- | unittests/IR/MetadataTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/IR/MetadataTest.cpp b/unittests/IR/MetadataTest.cpp index 11596160466..1addd155f2b 100644 --- a/unittests/IR/MetadataTest.cpp +++ b/unittests/IR/MetadataTest.cpp @@ -1817,6 +1817,7 @@ TEST_F(DILocalVariableTest, get) { 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 @@ TEST_F(DILocalVariableTest, get) { 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))); |