summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
index 9f5be6164f5..976edf0a2ab 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
@@ -46,18 +46,23 @@ class DebugLocEntry {
if (EntryKind != Next.EntryKind)
return false;
+ bool EqualValues;
switch (EntryKind) {
case E_Location:
- if (Loc != Next.Loc) return false;
+ EqualValues = Loc == Next.Loc;
+ break;
case E_Integer:
- if (Constants.Int != Next.Constants.Int) return false;
+ EqualValues = Constants.Int == Next.Constants.Int;
+ break;
case E_ConstantFP:
- if (Constants.CFP != Next.Constants.CFP) return false;
+ EqualValues = Constants.CFP == Next.Constants.CFP;
+ break;
case E_ConstantInt:
- if (Constants.CIP != Next.Constants.CIP) return false;
+ EqualValues = Constants.CIP == Next.Constants.CIP;
+ break;
}
- return true;
+ return EqualValues;
}
public:
OpenPOWER on IntegriCloud