forked from OSchip/llvm-project
Demote the "Debug Info Version" module flag to llvm::Module::Warning
behavior on mismatch. The AutoUpgrader will drop incompatible debug info any way and also emit a warning diagnostic for it. rdar://problem/16926122 llvm-svn: 209182
This commit is contained in:
parent
1fc760add4
commit
2dbdd20d37
|
@ -301,12 +301,10 @@ void CodeGenModule::Release() {
|
|||
getModule().addModuleFlag(llvm::Module::Warning, "Dwarf Version",
|
||||
CodeGenOpts.DwarfVersion);
|
||||
if (DebugInfo)
|
||||
// We support a single version in the linked module: error out when
|
||||
// modules do not have the same version. We are going to implement dropping
|
||||
// debug info when the version number is not up-to-date. Once that is
|
||||
// done, the bitcode linker is not going to see modules with different
|
||||
// version numbers.
|
||||
getModule().addModuleFlag(llvm::Module::Error, "Debug Info Version",
|
||||
// We support a single version in the linked module. The LLVM
|
||||
// parser will drop debug info with a different version number
|
||||
// (and warn about it, too).
|
||||
getModule().addModuleFlag(llvm::Module::Warning, "Debug Info Version",
|
||||
llvm::DEBUG_METADATA_VERSION);
|
||||
|
||||
SimplifyPersonality();
|
||||
|
|
|
@ -4,5 +4,5 @@ int main (void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
// CHECK: metadata !{i32 1, metadata !"Debug Info Version", i32 1}
|
||||
// CHECK: metadata !{i32 2, metadata !"Debug Info Version", i32 1}
|
||||
// NO_DEBUG-NOT: metadata !"Debug Info Version"
|
||||
|
|
Loading…
Reference in New Issue