|
@@ -396,16 +396,27 @@ void CGDebugInfo::CreateCompileUnit() {
|
|
|
if (LO.ObjC1)
|
|
|
RuntimeVers = LO.ObjCRuntime.isNonFragile() ? 2 : 1;
|
|
|
|
|
|
+ llvm::DICompileUnit::DebugEmissionKind EmissionKind;
|
|
|
+ switch (DebugKind) {
|
|
|
+ case codegenoptions::NoDebugInfo:
|
|
|
+ case codegenoptions::LocTrackingOnly:
|
|
|
+ EmissionKind = llvm::DICompileUnit::NoDebug;
|
|
|
+ break;
|
|
|
+ case codegenoptions::DebugLineTablesOnly:
|
|
|
+ EmissionKind = llvm::DICompileUnit::LineTablesOnly;
|
|
|
+ break;
|
|
|
+ case codegenoptions::LimitedDebugInfo:
|
|
|
+ case codegenoptions::FullDebugInfo:
|
|
|
+ EmissionKind = llvm::DICompileUnit::FullDebug;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
// Create new compile unit.
|
|
|
// FIXME - Eliminate TheCU.
|
|
|
TheCU = DBuilder.createCompileUnit(
|
|
|
LangTag, remapDIPath(MainFileName), remapDIPath(getCurrentDirname()),
|
|
|
Producer, LO.Optimize, CGM.getCodeGenOpts().DwarfDebugFlags, RuntimeVers,
|
|
|
- CGM.getCodeGenOpts().SplitDwarfFile,
|
|
|
- DebugKind <= codegenoptions::DebugLineTablesOnly
|
|
|
- ? llvm::DICompileUnit::LineTablesOnly
|
|
|
- : llvm::DICompileUnit::FullDebug,
|
|
|
- 0 /* DWOid */, DebugKind != codegenoptions::LocTrackingOnly);
|
|
|
+ CGM.getCodeGenOpts().SplitDwarfFile, EmissionKind, 0 /* DWOid */);
|
|
|
}
|
|
|
|
|
|
llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
|