aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorChih-Ping Chen <chih-ping.chen@intel.com>2020-12-17 11:08:46 -0500
committerChih-Ping Chen <chih-ping.chen@intel.com>2020-12-18 13:10:57 -0500
commit5f75dcf5719f8ba2819b73109888175cf92fe253 (patch)
treef9c78d909914b2adb4586cb1de0b189b057afc0c /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent5e5ef5359742c3feb6f41058a356a28c7ab3ea6d (diff)
downloadllvm-5f75dcf5719f8ba2819b73109888175cf92fe253.zip
llvm-5f75dcf5719f8ba2819b73109888175cf92fe253.tar.gz
llvm-5f75dcf5719f8ba2819b73109888175cf92fe253.tar.bz2
[DebugInfo] Support Fortran 'use <external module>' statement.
The main change is to add a 'IsDecl' field to DIModule so that when IsDecl is set to true, the debug info entry generated for the module would be marked as a declaration. That way, the debugger would look up the definition of the module in the gloabl scope. Please see the comments in llvm/test/DebugInfo/X86/dimodule.ll for what the debug info entries would look like. Differential Revision: https://reviews.llvm.org/D93462
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 b6a2e0b..dee7025 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1868,6 +1868,7 @@ void ModuleBitcodeWriter::writeDIModule(const DIModule *N,
for (auto &I : N->operands())
Record.push_back(VE.getMetadataOrNullID(I));
Record.push_back(N->getLineNo());
+ Record.push_back(N->getIsDecl());
Stream.EmitRecord(bitc::METADATA_MODULE, Record, Abbrev);
Record.clear();