summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-as/llvm-as.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-01 05:33:11 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-01 05:33:11 +0000
commitd7ad221c161dbf048c1d4f4f3ce3c24bbb203a13 (patch)
tree75fa347cdbbe74459f4acec5ab77a20aff7db12c /llvm/tools/llvm-as/llvm-as.cpp
parenteed269329caa92d0bf11c72a2eec0e7143bea18b (diff)
downloadbcm5719-llvm-d7ad221c161dbf048c1d4f4f3ce3c24bbb203a13.tar.gz
bcm5719-llvm-d7ad221c161dbf048c1d4f4f3ce3c24bbb203a13.zip
Add a module Hash in the bitcode and the combined index, implementing a kind of "build-id"
This is intended to be used for ThinLTO incremental build. Differential Revision: http://reviews.llvm.org/D18213 This is a recommit of r265095 after fixing the Windows issues. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 265111
Diffstat (limited to 'llvm/tools/llvm-as/llvm-as.cpp')
-rw-r--r--llvm/tools/llvm-as/llvm-as.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/llvm-as/llvm-as.cpp b/llvm/tools/llvm-as/llvm-as.cpp
index 7318bfe341d..7e9500a6672 100644
--- a/llvm/tools/llvm-as/llvm-as.cpp
+++ b/llvm/tools/llvm-as/llvm-as.cpp
@@ -48,6 +48,9 @@ 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));
+
static cl::opt<bool>
DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
@@ -82,7 +85,7 @@ static void WriteOutputFile(const Module *M) {
if (Force || !CheckBitcodeOutputToConsole(Out->os(), true))
WriteBitcodeToFile(M, Out->os(), PreserveBitcodeUseListOrder,
- EmitSummaryIndex);
+ EmitSummaryIndex, EmitModuleHash);
// Declare success.
Out->keep();
OpenPOWER on IntegriCloud