[clang] 97f490d - Don't set the isOptimized flag in module skeleton DICompileUnits.
Adrian Prantl via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 20 14:18:34 PDT 2020
Author: Adrian Prantl
Date: 2020-03-20T14:18:15-07:00
New Revision: 97f490d87b226b1deade74ec93b4378fb28d26cc
URL: https://github.com/llvm/llvm-project/commit/97f490d87b226b1deade74ec93b4378fb28d26cc
DIFF: https://github.com/llvm/llvm-project/commit/97f490d87b226b1deade74ec93b4378fb28d26cc.diff
LOG: Don't set the isOptimized flag in module skeleton DICompileUnits.
It's not used for anything.
Added:
Modified:
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/Modules/ExtDebugInfo.m
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 6d0960687a95..9645dd1deb42 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 41247b00a49f..380bc4c9bb98 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",
More information about the cfe-commits
mailing list