IR: Allow 16-bits for column info

Raise the limit for column information from 8 bits to 16 bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226291 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-01-16 17:33:08 +00:00
parent 44fb4b337f
commit fb7514fccb
5 changed files with 17 additions and 14 deletions

View File

@ -653,7 +653,7 @@ MDLocation::MDLocation(LLVMContext &C, unsigned Line, unsigned Column,
// Set line and column.
assert(Line < (1u << 24) && "Expected 24-bit line");
assert(Column < (1u << 8) && "Expected 8-bit column");
assert(Column < (1u << 16) && "Expected 16-bit column");
MDNodeSubclassData = Line;
SubclassData16 = Column;
@ -676,8 +676,8 @@ static void adjustLine(unsigned &Line) {
}
static void adjustColumn(unsigned &Column) {
// Set to unknown on overflow. Still use 8 bits for now.
if (Column >= (1u << 8))
// Set to unknown on overflow. We only have 16 bits to play with here.
if (Column >= (1u << 16))
Column = 0;
}