[PATCH] Move ownership of GCStrategy objects to LLVMContext
Chandler Carruth
chandlerc at gmail.com
Thu Jan 15 15:52:06 PST 2015
So, I don't know the GC code at all and am assuming that GCStrategy.{h,cpp} are just moves of existing code. But provided that there is nothing interesting about the GC side of this and my understanding of the move is correct, this change looks good with the comments on the changed (not moved) code addressed. Two more minor ones below.
================
Comment at: lib/CodeGen/GCMetadata.cpp:74-75
@@ +73,4 @@
+ if (!S) {
+ dbgs() << "unsupported GC: " << F.getGC() << "\n";
+ llvm_unreachable(nullptr);
+ }
----------------
Use report_fatal_error here.
================
Comment at: lib/IR/Function.cpp:392-393
@@ +391,4 @@
+ // the GC in question.
+ const char *Name = getGC();
+ return getContext().pImpl->getGCStrategy(Name);
+}
----------------
This variable doesn't seem to be adding much...
http://reviews.llvm.org/D6811
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list