[lld] [lld][COFF][LTO] Implement /lldemit:asm option (PR #67079)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 3 08:38:51 PDT 2023
================
@@ -87,13 +87,21 @@ lto::Config BitcodeCompiler::createConfig() {
c.RunCSIRInstr = ctx.config.ltoCSProfileGenerate;
c.PGOWarnMismatch = ctx.config.ltoPGOWarnMismatch;
- if (ctx.config.emit == EmitKind::LLVM) {
+ switch (ctx.config.emit) {
+ case EmitKind::Obj:
----------------
aganea wrote:
Sorry actually I meant to suggest:
```
if (ctx.config.emit == EmitKind::LLVM) {
..
} else if (ctx.config.emit == EmitKind::ASM) {
..
}
```
I find the switch-case is less suitable here. Forget my comment about unreachable, a potential new `EmitKind`
enumeration might add code in other places in this function, or not all, like `EmitKind::Obj`.
https://github.com/llvm/llvm-project/pull/67079
More information about the llvm-commits
mailing list