Skip to content

Commit

Permalink
A signed bitfield's range is [-1,0], so assigning 1 is technically an…
Browse files Browse the repository at this point in the history
… 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260973 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
AaronBallman committed Feb 16, 2016
1 parent 4d9522f commit ebdb0a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ebdb0a3

Please sign in to comment.