diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-16 17:33:08 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-01-16 17:33:08 +0000 |
commit | 2f5bb31302fb5f09b997fe5b3b7474665eab6141 (patch) | |
tree | 137013d010e9ba832a2692b59f716a067844612b /llvm/lib/IR/Metadata.cpp | |
parent | c9cddb083746c5a52f87f52f17d2555e0ead9422 (diff) | |
download | bcm5719-llvm-2f5bb31302fb5f09b997fe5b3b7474665eab6141.tar.gz bcm5719-llvm-2f5bb31302fb5f09b997fe5b3b7474665eab6141.zip |
IR: Allow 16-bits for column info
Raise the limit for column information from 8 bits to 16 bits.
llvm-svn: 226291
Diffstat (limited to 'llvm/lib/IR/Metadata.cpp')
-rw-r--r-- | llvm/lib/IR/Metadata.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index 2c6b332dc8e..de204d58764 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -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; } |