diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-01 05:33:11 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-01 05:33:11 +0000 |
commit | d7ad221c161dbf048c1d4f4f3ce3c24bbb203a13 (patch) | |
tree | 75fa347cdbbe74459f4acec5ab77a20aff7db12c /llvm/tools/llvm-as/llvm-as.cpp | |
parent | eed269329caa92d0bf11c72a2eec0e7143bea18b (diff) | |
download | bcm5719-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.cpp | 5 |
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(); |