mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
[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
This commit is contained in:
parent
1f03619959
commit
30f743e304
@ -1875,8 +1875,8 @@ class DILocalVariable : public DIVariable {
|
||||
unsigned Arg, unsigned Flags, ArrayRef<Metadata *> Ops)
|
||||
: DIVariable(C, DILocalVariableKind, Storage, Line, Ops), Arg(Arg),
|
||||
Flags(Flags) {
|
||||
assert(Flags < ((1 << 16) - 1) && "DILocalVariable: Flags out of range");
|
||||
assert(Arg < ((1 << 16) - 1) && "DILocalVariable: Arg out of range");
|
||||
assert(Flags < (1 << 16) && "DILocalVariable: Flags out of range");
|
||||
assert(Arg < (1 << 16) && "DILocalVariable: Arg out of range");
|
||||
}
|
||||
~DILocalVariable() = default;
|
||||
|
||||
|
@ -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)));
|
||||
|
Loading…
Reference in New Issue
Block a user