summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2018-06-29 14:23:28 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2018-06-29 14:23:28 +0000
commit2a03d4296a5e462855dd43c9808f406a4f1cea16 (patch)
tree2e0a148fd6cf20f5385c0ce73ede9f467008581c /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentce3a66804a5bc42773d6d226df89addbfc43ccf3 (diff)
downloadbcm5719-llvm-2a03d4296a5e462855dd43c9808f406a4f1cea16.tar.gz
bcm5719-llvm-2a03d4296a5e462855dd43c9808f406a4f1cea16.zip
[DEBUG_INFO, NVPTX] Do not emit .debug_loc section.
Summary: .debug_loc section is not supported for NVPTX target. If there is an object whose location can change during its lifetime, we do not generate debug location info for this variable. Reviewers: echristo Subscribers: jholewinski, JDevlieghere, llvm-commits Differential Revision: https://reviews.llvm.org/D48730 llvm-svn: 335976
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index c7688141803..a33bda34630 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -317,6 +317,8 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
else
UseInlineStrings = DwarfInlinedStrings == Enable;
+ UseLocSection = !TT.isNVPTX();
+
HasAppleExtensionAttributes = tuneForLLDB();
// Handle split DWARF.
@@ -1196,6 +1198,9 @@ void DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU,
RegVar->initializeDbgValue(MInsn);
continue;
}
+ // Do not emit location lists if .debug_loc secton is disabled.
+ if (!useLocSection())
+ continue;
// Handle multiple DBG_VALUE instructions describing one variable.
DebugLocStream::ListBuilder List(DebugLocs, TheCU, *Asm, *RegVar, *MInsn);
OpenPOWER on IntegriCloud