tejohnson added inline comments.

================
Comment at: lib/CodeGen/BackendUtil.cpp:65
+        "Ignore an empty index file and perform non-ThinLTO compilation"),
+    llvm::cl::init(false));
+
----------------
tejohnson wrote:
> mehdi_amini wrote:
> > Is it common to do this in clang?
> Doesn't look common, but I see one other LLVM internal option (in 
> CodeGenPGO.cpp), and a few other uses in tests. Is there a better way to do 
> internal options in clang?
Since this doesn't look like something commonly done in clang, I am splitting 
this into 2 patches, one in LLVM and one here. LLVM will instead contain the 
option, and return a nullptr from llvm::getModuleSummaryIndexForFile when the 
option is enabled and the file is empty. The clang side can just proceed to 
normal compilation if a nullptr CombinedIndex is returned (if the option is not 
enabled, LLVM would return an error instead).


https://reviews.llvm.org/D28362



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to