Don't set the isOptimized flag in module skeleton DICompileUnits.

It's not used for anything.
This commit is contained in:
Adrian Prantl 2020-03-20 14:17:32 -07:00
parent 079c6ddaf5
commit 97f490d87b
2 changed files with 7 additions and 2 deletions

View File

@ -2500,7 +2500,7 @@ llvm::DIModule *CGDebugInfo::getOrCreateModuleRef(ASTSourceDescriptor Mod,
DIB.createCompileUnit(TheCU->getSourceLanguage(),
// TODO: Support "Source" from external AST providers?
DIB.createFile(Mod.getModuleName(), CompDir),
TheCU->getProducer(), true, StringRef(), 0, PCM,
TheCU->getProducer(), false, StringRef(), 0, PCM,
llvm::DICompileUnit::FullDebug, Signature);
DIB.finalize();
}

View File

@ -6,13 +6,16 @@
// RUN: -fmodule-format=obj -fimplicit-module-maps -DMODULES \
// RUN: -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t-mod.ll
// RUN: cat %t-mod.ll | FileCheck %s
// RUN: cat %t-mod.ll | FileCheck %s --check-prefix=DWOID
// PCH:
// RUN: %clang_cc1 -x objective-c -fmodule-format=obj -emit-pch -I%S/Inputs \
// RUN: -o %t.pch %S/Inputs/DebugObjC.h
// RUN: %clang_cc1 -x objective-c -debug-info-kind=limited -dwarf-ext-refs -fmodule-format=obj \
// RUN: %clang_cc1 -x objective-c -debug-info-kind=limited -dwarf-ext-refs \
// RUN: -fmodule-format=obj \
// RUN: -include-pch %t.pch %s -emit-llvm -o %t-pch.ll %s
// RUN: cat %t-pch.ll | FileCheck %s
// RUN: cat %t-pch.ll | FileCheck %s --check-prefix=DWOID
#ifdef MODULES
@import DebugObjC;
@ -34,6 +37,8 @@ int foo(ObjCClass *c) {
return [c property];
}
// DWOID: !DICompileUnit(language: DW_LANG_ObjC,{{.*}}isOptimized: false,{{.*}}dwoId:
// CHECK: ![[MOD:.*]] = !DIModule(scope: null, name: "DebugObjC
// CHECK: !DIGlobalVariable(name: "GlobalUnion",