diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-08-05 18:51:13 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-08-05 18:51:13 +0000 |
commit | 124955aade67bb0455a8c0dc1f01d86b265ef277 (patch) | |
tree | 3a2e5625ea970deabec9e390df20e2566732bbe8 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | b2fda0d95ca1d27b1f6b1707685bd0f3fd8789d9 (diff) | |
download | bcm5719-llvm-124955aade67bb0455a8c0dc1f01d86b265ef277.tar.gz bcm5719-llvm-124955aade67bb0455a8c0dc1f01d86b265ef277.zip |
Add -gcodeview and -gdwarf to control which type Clang emits
Summary:
By default, 'clang' emits dwarf and 'clang-cl' emits codeview. You can
force emission of one or both by passing -gcodeview and -gdwarf to
either driver.
Reviewers: dblaikie, hans
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11742
llvm-svn: 244097
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index e899c9442b2..8e5bc5d327f 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -369,11 +369,16 @@ void CodeGenModule::Release() { (Context.getLangOpts().Modules || !LinkerOptionsMetadata.empty())) { EmitModuleLinkOptions(); } - if (CodeGenOpts.DwarfVersion) + 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); + } + if (CodeGenOpts.EmitCodeView) { + // Indicate that we want CodeView in the metadata. + getModule().addModuleFlag(llvm::Module::Warning, "CodeView", 1); + } if (DebugInfo) // We support a single version in the linked module. The LLVM // parser will drop debug info with a different version number |