From 26ab5772b058fcddabfecb6736a3b78c67bc1751 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Tue, 15 Mar 2016 00:04:37 +0000 Subject: [ThinLTO] Renaming of function index to module summary index (NFC) (Resubmitting after fixing missing file issue) With the changes in r263275, there are now more than just functions in the summary. Completed the renaming of data structures (started in r263275) to reflect the wider scope. In particular, changed the FunctionIndex* data structures to ModuleIndex*, and renamed related variables and comments. Also renamed the files to reflect the changes. A companion clang patch will immediately succeed this patch to reflect this renaming. llvm-svn: 263513 --- llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp index 24de99a34d3..85b9bd83c13 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp @@ -19,7 +19,7 @@ using namespace llvm; PreservedAnalyses BitcodeWriterPass::run(Module &M) { - WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder, EmitFunctionSummary); + WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder, EmitSummaryIndex); return PreservedAnalyses::all(); } @@ -27,21 +27,20 @@ namespace { class WriteBitcodePass : public ModulePass { raw_ostream &OS; // raw_ostream to print on bool ShouldPreserveUseListOrder; - bool EmitFunctionSummary; + bool EmitSummaryIndex; public: static char ID; // Pass identification, replacement for typeid explicit WriteBitcodePass(raw_ostream &o, bool ShouldPreserveUseListOrder, - bool EmitFunctionSummary) + bool EmitSummaryIndex) : ModulePass(ID), OS(o), ShouldPreserveUseListOrder(ShouldPreserveUseListOrder), - EmitFunctionSummary(EmitFunctionSummary) {} + EmitSummaryIndex(EmitSummaryIndex) {} const char *getPassName() const override { return "Bitcode Writer"; } bool runOnModule(Module &M) override { - WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder, - EmitFunctionSummary); + WriteBitcodeToFile(&M, OS, ShouldPreserveUseListOrder, EmitSummaryIndex); return false; } }; @@ -51,7 +50,7 @@ char WriteBitcodePass::ID = 0; ModulePass *llvm::createBitcodeWriterPass(raw_ostream &Str, bool ShouldPreserveUseListOrder, - bool EmitFunctionSummary) { + bool EmitSummaryIndex) { return new WriteBitcodePass(Str, ShouldPreserveUseListOrder, - EmitFunctionSummary); + EmitSummaryIndex); } -- cgit v1.2.3