[PATCH] D20147: [WIP] DebugInfo: New metadata representation for global variables.
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 12 10:03:15 PDT 2016
aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.
Thanks, from my end this looks great!
If you happen to have a script to upgrade the testcases, it would be great if you could file a PR for this and attach the script there and comment in the commit message. This will make it easier for people with out-of-tree testcases.
================
Comment at: lib/Bitcode/Reader/BitcodeReader.cpp:2605
@@ +2604,3 @@
+ // Upgrade old metadata, which stored a global variable reference or a
+ // ConstantInt here.
+ Metadata *Expr = getMDOrNull(Record[9]);
----------------
Please make sure to add a binary bitcode upgrade test case for this.
================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:129
@@ +128,3 @@
+ // DW_AT_const_value(X).
+ if (Expr && Expr->getNumElements() == 3 &&
+ Expr->getElement(0) == dwarf::DW_OP_constu &&
----------------
Since we already have a special createConstantValueExpression() method we could also add an Optional<uint64> getConstantValueExpression() accessor?
https://reviews.llvm.org/D20147
More information about the llvm-commits
mailing list