aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorSteve Merritt <steve.merritt@intel.com>2025-07-30 09:48:06 -0400
committerGitHub <noreply@github.com>2025-07-30 09:48:06 -0400
commitb47d9d033acd26e492bef9429ee9bce640be0901 (patch)
tree3766caed14dc9d70c3e2246b3c8767cdfaa20534 /clang/lib/CodeGen/CGDebugInfo.cpp
parent3d4f1fee48689465b5026f75414247307db7d34d (diff)
downloadllvm-b47d9d033acd26e492bef9429ee9bce640be0901.zip
llvm-b47d9d033acd26e492bef9429ee9bce640be0901.tar.gz
llvm-b47d9d033acd26e492bef9429ee9bce640be0901.tar.bz2
[clang][DebugInfo] Don't emit VTable debug symbols for -gline-tables-only. (#151025)
The -gline-tables-only option emits minimal debug info for functions, files and line numbers while omitting variables, parameters and most type information. VTable debug symbols are emitted to facilitate a debugger's ability to perform automatic type promotion on variables and parameters. With variables and parameters being omitted, the VTable symbols are unnecessary.
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 77fc3a2..7a69b5d 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2641,6 +2641,8 @@ void CGDebugInfo::emitVTableSymbol(llvm::GlobalVariable *VTable,
const CXXRecordDecl *RD) {
if (!CGM.getTarget().getCXXABI().isItaniumFamily())
return;
+ if (DebugKind <= llvm::codegenoptions::DebugLineTablesOnly)
+ return;
ASTContext &Context = CGM.getContext();
StringRef SymbolName = "_vtable$";