aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfoMetadata.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-08-28 22:58:50 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-08-28 22:58:50 +0000
commitb09eb9f1c2b2e36b49b32e149a82a49380a4f4b0 (patch)
treee31cb5ae9ad2438b05b9c3cd069b4176c099604b /llvm/lib/IR/DebugInfoMetadata.cpp
parenta37b065e8fa57ae40d14dfdb5afed4628129b1ea (diff)
downloadllvm-b09eb9f1c2b2e36b49b32e149a82a49380a4f4b0.zip
llvm-b09eb9f1c2b2e36b49b32e149a82a49380a4f4b0.tar.gz
llvm-b09eb9f1c2b2e36b49b32e149a82a49380a4f4b0.tar.bz2
DI: Set DILexicalBlock columns >= 65536 to 0/unknown
This fixes PR24621 and matches what we do for `DILocation`. Although the limit seems somewhat artificial, there are places in the backend that also assume 16-bit columns, so we may as well just be consistent about the limits. llvm-svn: 246349
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r--llvm/lib/IR/DebugInfoMetadata.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp
index 89111f7..3c293c2 100644
--- a/llvm/lib/IR/DebugInfoMetadata.cpp
+++ b/llvm/lib/IR/DebugInfoMetadata.cpp
@@ -386,6 +386,9 @@ DILexicalBlock *DILexicalBlock::getImpl(LLVMContext &Context, Metadata *Scope,
Metadata *File, unsigned Line,
unsigned Column, StorageType Storage,
bool ShouldCreate) {
+ // Fixup column.
+ adjustColumn(Column);
+
assert(Scope && "Expected scope");
DEFINE_GETIMPL_LOOKUP(DILexicalBlock, (Scope, File, Line, Column));
Metadata *Ops[] = {File, Scope};