[PATCH] D32195: Object: Remove ModuleSummaryIndexObjectFile class.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 09:30:30 PDT 2017


pcc added inline comments.


================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:63
 
+static llvm::cl::opt<bool> IgnoreEmptyThinLTOIndexFile(
+    "ignore-empty-index-file", llvm::cl::ZeroOrMore,
----------------
tejohnson wrote:
> Not sure llvm options are encouraged in clang (I only see a couple of cases currently).
> 
> Can you instead just move llvm::getModuleSummaryIndexForFile into BitcodeReader and avoid a lot of these changes?
The other clients do not need to be able to handle a null index (and I think some of them were crashing if they got one). I want to remove the possibility of the other clients getting a null index from this function.

The llvm::cl option is a pre-existing evil, this change isolates it to the only place that needs it and makes it easier to change to a proper clang option later.


https://reviews.llvm.org/D32195





More information about the llvm-commits mailing list