diff options
author | Dan Gohman <gohman@apple.com> | 2010-08-24 14:31:06 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-08-24 14:31:06 +0000 |
commit | 7c7f13a5e64258f6ec704d61c090ffcec14e3736 (patch) | |
tree | ef2593f4eccf5893bfe08041225d385a3b4eb272 /llvm/lib/AsmParser/LLParser.h | |
parent | 117db7e95ad63750f3543df5d2997844da5f1eb3 (diff) | |
download | bcm5719-llvm-7c7f13a5e64258f6ec704d61c090ffcec14e3736.tar.gz bcm5719-llvm-7c7f13a5e64258f6ec704d61c090ffcec14e3736.zip |
Add a comment explaining why this code is more complex than it
initially seems it should require.
llvm-svn: 111913
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.h')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.h b/llvm/lib/AsmParser/LLParser.h index 444bae2390e..5ac7337b136 100644 --- a/llvm/lib/AsmParser/LLParser.h +++ b/llvm/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; |