Add a DIModule metadata node to the IR.
authorAdrian Prantl <aprantl@apple.com>
Mon, 29 Jun 2015 23:03:47 +0000 (23:03 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 29 Jun 2015 23:03:47 +0000 (23:03 +0000)
commit717764717b34568a1db4f7c8ac30c540f38161ec
treee454c4933778b480f51976cfd8d4f2e44e6ccf8b
parent88f33c9916c4a54cb20aad9b69782f14985d4d24
Add a DIModule metadata node to the IR.
It is meant to be used to record modules @imported by the current
compile unit, so a debugger an import the same modules to replicate this
environment before dropping into the expression evaluator.

DIModule is a sibling to DINamespace and behaves quite similarly.
In addition to the name of the module it also records the module
configuration details that are necessary to uniquely identify the module.
This includes the configuration macros (e.g., -DNDEBUG), the include path
where the module.map file is to be found, and the isysroot.

The idea is that the backend will turn this into a DW_TAG_module.

http://reviews.llvm.org/D9614
rdar://problem/20965932

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241017 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
include/llvm/Bitcode/LLVMBitCodes.h
include/llvm/IR/DIBuilder.h
include/llvm/IR/DebugInfoMetadata.h
include/llvm/IR/Metadata.def
include/llvm/IR/Metadata.h
lib/AsmParser/LLParser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/IR/AsmWriter.cpp
lib/IR/DIBuilder.cpp
lib/IR/DebugInfo.cpp
lib/IR/DebugInfoMetadata.cpp
lib/IR/LLVMContextImpl.h
lib/IR/Verifier.cpp
test/Assembler/dimodule.ll [new file with mode: 0644]
unittests/IR/MetadataTest.cpp