OSDN Git Service

[LiveDebugValues] Fix comparison operator in VarLocBasedImpl
authorSander de Smalen <sander.desmalen@arm.com>
Tue, 12 Jan 2021 08:32:21 +0000 (08:32 +0000)
committerSander de Smalen <sander.desmalen@arm.com>
Tue, 12 Jan 2021 08:44:58 +0000 (08:44 +0000)
The issue was introduced in commit rG84a1120943a651184bae507fed5d648fee381ae4
and would cause a VarLoc's StackOffset to be compared with its own, instead of
the StackOffset from the other VarLoc. This patch fixes that.

llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp

index 4811b80..e2daa46 100644 (file)
@@ -572,8 +572,9 @@ private:
                                Expr) <
                std::make_tuple(
                    Other.Var, Other.Kind, Other.Loc.SpillLocation.SpillBase,
-                   Loc.SpillLocation.SpillOffset.getFixed(),
-                   Loc.SpillLocation.SpillOffset.getScalable(), Other.Expr);
+                   Other.Loc.SpillLocation.SpillOffset.getFixed(),
+                   Other.Loc.SpillLocation.SpillOffset.getScalable(),
+                   Other.Expr);
       case RegisterKind:
       case ImmediateKind:
       case EntryValueKind: