summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-as/llvm-as.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-12 21:35:18 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-12 21:35:18 +0000
commit68da426eeaea586d8e21fe1a18b2220630ba22ac (patch)
treec0ea1c710573fd1c57c06be60e40ac353701815c /llvm/tools/llvm-as/llvm-as.cpp
parent32ad24d4efae1484a73e91257f8fe3d1c8bcf7be (diff)
downloadbcm5719-llvm-68da426eeaea586d8e21fe1a18b2220630ba22ac.tar.gz
bcm5719-llvm-68da426eeaea586d8e21fe1a18b2220630ba22ac.zip
Move summary creation out of llvm-as into opt
Summary: Let keep llvm-as "dumb": it converts textual IR to bitcode. This commit removes the dependency from llvm-as to libLLVMAnalysis. We'll add back summary in llvm-as if we get to a textual representation for it at some point. In the meantime, opt seems like a better place for that. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19032 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266131
Diffstat (limited to 'llvm/tools/llvm-as/llvm-as.cpp')
-rw-r--r--llvm/tools/llvm-as/llvm-as.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/tools/llvm-as/llvm-as.cpp b/llvm/tools/llvm-as/llvm-as.cpp
index 89397cde3ef..1e795083992 100644
--- a/llvm/tools/llvm-as/llvm-as.cpp
+++ b/llvm/tools/llvm-as/llvm-as.cpp
@@ -15,7 +15,6 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Analysis/ModuleSummaryAnalysis.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/IR/LLVMContext.h"
@@ -45,10 +44,6 @@ static cl::opt<bool> Force("f", cl::desc("Enable binary output on terminals"));
static cl::opt<bool> DisableOutput("disable-output", cl::desc("Disable output"),
cl::init(false));
-static cl::opt<bool> EmitSummaryIndex("module-summary",
- cl::desc("Emit module summary index"),
- cl::init(false));
-
static cl::opt<bool> EmitModuleHash("module-hash", cl::desc("Emit module hash"),
cl::init(false));
@@ -84,14 +79,9 @@ static void WriteOutputFile(const Module *M) {
exit(1);
}
- if (Force || !CheckBitcodeOutputToConsole(Out->os(), true)) {
- std::unique_ptr<ModuleSummaryIndex> Index;
- if (EmitSummaryIndex)
- Index = ModuleSummaryIndexBuilder(M).takeIndex();
-
- WriteBitcodeToFile(M, Out->os(), PreserveBitcodeUseListOrder, Index.get(),
+ if (Force || !CheckBitcodeOutputToConsole(Out->os(), true))
+ WriteBitcodeToFile(M, Out->os(), PreserveBitcodeUseListOrder, nullptr,
EmitModuleHash);
- }
// Declare success.
Out->keep();
OpenPOWER on IntegriCloud