[PATCH] D14265: DI: Reverse direction of subprogram -> function edge.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 10:02:59 PST 2015
dblaikie added a subscriber: dblaikie.
dblaikie added a comment.
Generally looks good to me - one or two minor comments.
================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:1027
@@ -1026,3 +1026,3 @@
Record.push_back(N->isOptimized());
- Record.push_back(VE.getMetadataOrNullID(N->getRawFunction()));
+ Record.push_back(0);
Record.push_back(VE.getMetadataOrNullID(N->getTemplateParams().get()));
----------------
Could we use the size of the record to determine whether we're in the old format or the new one? Rather than including an empty field?
================
Comment at: lib/IR/DebugInfoMetadata.cpp:364
@@ -364,8 +363,3 @@
-Function *DISubprogram::getFunction() const {
- // FIXME: Should this be looking through bitcasts?
- return dyn_cast_or_null<Function>(getFunctionConstant());
-}
-
bool DISubprogram::describes(const Function *F) const {
assert(F && "Invalid function");
----------------
I wonder if this function is even needed anymore... hopefully we'll just not encounter DISubprograms for a Function that aren't attached to the same Function.
http://reviews.llvm.org/D14265
More information about the llvm-commits
mailing list