forked from OSchip/llvm-project
Sanity check `opt` options compatibility: can't have module-summary or module-hash when emitting textual IR
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266216
This commit is contained in:
parent
b5b289339b
commit
fe6df26a8a
|
@ -620,9 +620,13 @@ int main(int argc, char **argv) {
|
|||
BOS = make_unique<raw_svector_ostream>(Buffer);
|
||||
OS = BOS.get();
|
||||
}
|
||||
if (OutputAssembly)
|
||||
if (OutputAssembly) {
|
||||
if (EmitSummaryIndex)
|
||||
report_fatal_error("Text output is incompatible with -module-summary");
|
||||
if (EmitModuleHash)
|
||||
report_fatal_error("Text output is incompatible with -module-hash");
|
||||
Passes.add(createPrintModulePass(*OS, "", PreserveAssemblyUseListOrder));
|
||||
else
|
||||
} else
|
||||
Passes.add(createBitcodeWriterPass(*OS, PreserveBitcodeUseListOrder,
|
||||
EmitSummaryIndex, EmitModuleHash));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue