summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-24 14:31:06 +0000
committerDan Gohman <gohman@apple.com>2010-08-24 14:31:06 +0000
commit41d6ab4b884120123e4f03bf284166f3af73deaa (patch)
tree7910dccbcccdfa3756286bf9a098f0029b3566c1 /lib/AsmParser/LLParser.h
parent55aebef654d11a11e24c8d6680f6647b73a715f7 (diff)
downloadllvm-41d6ab4b884120123e4f03bf284166f3af73deaa.tar.gz
llvm-41d6ab4b884120123e4f03bf284166f3af73deaa.tar.bz2
llvm-41d6ab4b884120123e4f03bf284166f3af73deaa.tar.xz
Add a comment explaining why this code is more complex than it
initially seems it should require. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.h')
-rw-r--r--lib/AsmParser/LLParser.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h
index 444bae2390..5ac7337b13 100644
--- a/lib/AsmParser/LLParser.h
+++ b/lib/AsmParser/LLParser.h
@@ -80,6 +80,14 @@ namespace llvm {
// Instruction metadata resolution. Each instruction can have a list of
// MDRef info associated with them.
+ //
+ // The simpler approach of just creating temporary MDNodes and then calling
+ // RAUW on them when the definition is processed doesn't work because some
+ // instruction metadata kinds, such as dbg, get stored in the IR in an
+ // "optimized" format which doesn't participate in the normal value use
+ // lists. This means that RAUW doesn't work, even on temporary MDNodes
+ // which otherwise support RAUW. Instead, we defer resolving MDNode
+ // references until the definitions have been processed.
struct MDRef {
SMLoc Loc;
unsigned MDKind, MDSlot;