summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/opt/opt.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index 035629a8aa4..a93c06c1d13 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -99,6 +99,10 @@ static cl::opt<bool>
OutputAssembly("S", cl::desc("Write output as LLVM assembly"));
static cl::opt<bool>
+ OutputThinLTOBC("thinlto-bc",
+ cl::desc("Write output as ThinLTO-ready bitcode"));
+
+static cl::opt<bool>
NoVerify("disable-verify", cl::desc("Do not run the verifier"), cl::Hidden);
static cl::opt<bool>
@@ -704,7 +708,9 @@ int main(int argc, char **argv) {
if (EmitModuleHash)
report_fatal_error("Text output is incompatible with -module-hash");
Passes.add(createPrintModulePass(*OS, "", PreserveAssemblyUseListOrder));
- } else
+ } else if (OutputThinLTOBC)
+ Passes.add(createWriteThinLTOBitcodePass(*OS));
+ else
Passes.add(createBitcodeWriterPass(*OS, PreserveBitcodeUseListOrder,
EmitSummaryIndex, EmitModuleHash));
}
OpenPOWER on IntegriCloud