@@ -296,6 +296,18 @@ static llvm::cl::opt<OptimizationMode> OptModeFlag(
296
296
" ignore debug info, reduce runtime" )),
297
297
llvm::cl::init(OptimizationMode::NotSet));
298
298
299
+ static llvm::cl::opt<IRGenDebugInfoLevel> IRGenDebugInfoLevelArg (
300
+ " irgen-debuginfo-level" , llvm::cl::desc(" IRGen debug info level" ),
301
+ llvm::cl::values(clEnumValN(IRGenDebugInfoLevel::None, " none" ,
302
+ " No debug info" ),
303
+ clEnumValN(IRGenDebugInfoLevel::LineTables, " line-tables" ,
304
+ " Line tables only" ),
305
+ clEnumValN(IRGenDebugInfoLevel::ASTTypes, " ast-types" ,
306
+ " Line tables + AST type references" ),
307
+ clEnumValN(IRGenDebugInfoLevel::DwarfTypes, " dwarf-types" ,
308
+ " Line tables + AST type refs + Dwarf types" )),
309
+ llvm::cl::init(IRGenDebugInfoLevel::ASTTypes));
310
+
299
311
static llvm::cl::opt<OptGroup> OptimizationGroup (
300
312
llvm::cl::desc (" Predefined optimization groups:" ),
301
313
llvm::cl::values(
@@ -684,6 +696,7 @@ int main(int argc, char **argv) {
684
696
} else {
685
697
IRGenOpts.OptMode = OptModeFlag;
686
698
}
699
+ IRGenOpts.DebugInfoLevel = IRGenDebugInfoLevelArg;
687
700
688
701
// Note: SILOpts, LangOpts, and IRGenOpts must be set before the
689
702
// CompilerInstance is initializer below based on Invocation.
0 commit comments