[PATCH] D20147: [WIP] DebugInfo: New metadata representation for global variables.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 13:53:51 PDT 2016
pcc added inline comments.
================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:2607
@@ +2606,3 @@
+ GlobalVariable *Attach = nullptr;
+ if (auto *CMD = dyn_cast_or_null<ConstantAsMetadata>(Expr)) {
+ if (auto *GV = dyn_cast<GlobalVariable>(CMD->getValue())) {
----------------
aprantl wrote:
> I'm not sure if Expr is guaranteed to be materialized at this point. You may need to store a list of DIExpressions and fix them up later.
> Duncan?
My understanding is that lazy materialization is only used for functions, which is why we need the fixup code for upgrading function metadata, but not for globals.
http://reviews.llvm.org/D20147
More information about the llvm-commits
mailing list