diff options
author | Manman Ren <mren@apple.com> | 2013-06-19 01:46:49 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-06-19 01:46:49 +0000 |
commit | 9691f7fa356143011dc0507238368ac3ed5dadf6 (patch) | |
tree | 36fbf58b3569afc367e5119d48de914d253f2c18 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | f796cf1ade21431ecef2b621cda79d22f4358355 (diff) | |
download | bcm5719-llvm-9691f7fa356143011dc0507238368ac3ed5dadf6.tar.gz bcm5719-llvm-9691f7fa356143011dc0507238368ac3ed5dadf6.zip |
Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4
These options will add a module flag with name "Dwarf Version".
The behavior flag is currently set to Warning, so when two values disagree,
a warning will be emitted.
llvm-svn: 184276
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d76fee5c844..18c56b0dae2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -190,6 +190,11 @@ void CodeGenModule::Release() { (Context.getLangOpts().Modules || !LinkerOptionsMetadata.empty())) { EmitModuleLinkOptions(); } + if (CodeGenOpts.DwarfVersion) + // We actually want the latest version when there are conflicts. + // We can change from Warning to Latest if such mode is supported. + getModule().addModuleFlag(llvm::Module::Warning, "Dwarf Version", + CodeGenOpts.DwarfVersion); SimplifyPersonality(); |