diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 6d0960687a95e..9645dd1deb428 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -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(); } diff --git a/clang/test/Modules/ExtDebugInfo.m b/clang/test/Modules/ExtDebugInfo.m index 41247b00a49f8..380bc4c9bb983 100644 --- a/clang/test/Modules/ExtDebugInfo.m +++ b/clang/test/Modules/ExtDebugInfo.m @@ -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",