diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-05-19 23:40:06 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-05-19 23:40:06 +0000 |
commit | 7fb0923c1f26eb08fac9eeb95b04015097c26686 (patch) | |
tree | 29aba678903fddcd3240b9f5014b4f4302d22537 /lib/CodeGen/CodeGenModule.cpp | |
parent | 5118df4f582afb69365a45801055e28c10224c90 (diff) | |
download | clang-7fb0923c1f26eb08fac9eeb95b04015097c26686.tar.gz clang-7fb0923c1f26eb08fac9eeb95b04015097c26686.tar.bz2 clang-7fb0923c1f26eb08fac9eeb95b04015097c26686.tar.xz |
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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 485beab740..af257c5466 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -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(); |