From c6a2f2140bf8b02f45c0f4740fe1b75696b56de4 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 16 Feb 2016 15:35:51 +0000 Subject: [PATCH] A signed bitfield's range is [-1,0], so assigning 1 is technically an overflow. However, the other bitfield requires a signed value (it supports negative offsets), so it is slightly better to retain a signed 1-bit bitfield and use -1 instead of 1. Silences an MSVC warning. llvm-svn: 260973 --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 9218579..84b3586 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -495,7 +495,7 @@ void CodeViewDebug::emitDebugInfoForFunction(const Function *GV, CodeViewDebug::LocalVarDefRange CodeViewDebug::createDefRangeMem(uint16_t CVRegister, int Offset) { LocalVarDefRange DR; - DR.InMemory = 1; + DR.InMemory = -1; DR.DataOffset = Offset; assert(DR.DataOffset == Offset && "truncation"); DR.StructOffset = 0; -- 2.7.4