summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-15 20:09:55 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-15 20:09:55 +0000
commit675e527ab856409294cccc0641ffc7f981fdd5e1 (patch)
treeb9e163d5a205951fa8e9cf1171f544a32fd3a7af
parent522a941c17906c7c2d1b62504c04ea9b0a7cf193 (diff)
downloadllvm-675e527ab856409294cccc0641ffc7f981fdd5e1.tar.gz
llvm-675e527ab856409294cccc0641ffc7f981fdd5e1.tar.bz2
llvm-675e527ab856409294cccc0641ffc7f981fdd5e1.tar.xz
DebugInfo: Add FIXME regarding DILexicalBlock uniquing fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208909 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/IR/DIBuilder.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index 48edc9a9b5..92edacc04a 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -1226,6 +1226,13 @@ DILexicalBlockFile DIBuilder::createLexicalBlockFile(DIDescriptor Scope,
DILexicalBlock DIBuilder::createLexicalBlock(DIDescriptor Scope, DIFile File,
unsigned Line, unsigned Col,
unsigned Discriminator) {
+ // FIXME: This isn't thread safe nor the right way to defeat MDNode uniquing.
+ // I believe the right way is to have a self-referential element in the node.
+ // Also: why do we bother with line/column - they're not used and the
+ // documentation (SourceLevelDebugging.rst) claims the line/col are necessary
+ // for uniquing, yet then we have this other solution (because line/col were
+ // inadequate) anyway. Remove all 3 and replace them with a self-reference.
+
// Defeat MDNode uniquing for lexical blocks by using unique id.
static unsigned int unique_id = 0;
Value *Elts[] = {