aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorAlok Kumar Sharma <AlokKumar.Sharma@amd.com>2020-05-15 11:24:27 +0530
committerSourabh Singh Tomar <SourabhSingh.Tomar@amd.com>2020-05-15 11:33:17 +0530
commit4042ada1c1fe4a9cd546600602281686bb2270cd (patch)
tree2e7f9d3c48ab5b4964980cacde8b08d27a8863fe /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parenta2545c3499a03cc1fdbd5f638f88572b23adf570 (diff)
downloadllvm-4042ada1c1fe4a9cd546600602281686bb2270cd.zip
llvm-4042ada1c1fe4a9cd546600602281686bb2270cd.tar.gz
llvm-4042ada1c1fe4a9cd546600602281686bb2270cd.tar.bz2
[DebugInfo] support for DW_AT_data_location in llvm
This patch adds support for DWARF attribute DW_AT_data_location. Summary: Dynamic arrays in fortran are described by array descriptor and data allocation address. Former is mapped to DW_AT_location and later is mapped to DW_AT_data_location. Testing: unit test cases added (hand-written) check llvm check debug-info Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D79592
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index c70c5ac..9e389fc6 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1627,6 +1627,7 @@ void ModuleBitcodeWriter::writeDICompositeType(
Record.push_back(VE.getMetadataOrNullID(N->getTemplateParams().get()));
Record.push_back(VE.getMetadataOrNullID(N->getRawIdentifier()));
Record.push_back(VE.getMetadataOrNullID(N->getDiscriminator()));
+ Record.push_back(VE.getMetadataOrNullID(N->getRawDataLocation()));
Stream.EmitRecord(bitc::METADATA_COMPOSITE_TYPE, Record, Abbrev);
Record.clear();