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 | 2dbdd20d378948db54347dcf13ec5bf50683b3d5 (patch) | |
| tree | ad00e46806b4603234ff87adb8606445e42359b2 /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | 1fc760add412090e0eebda6b215c8eeb53c188f5 (diff) | |
| download | bcm5719-llvm-2dbdd20d378948db54347dcf13ec5bf50683b3d5.tar.gz bcm5719-llvm-2dbdd20d378948db54347dcf13ec5bf50683b3d5.zip | |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 485beab7403..af257c5466e 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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(); |

