summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-06-29 23:03:47 +0000
committerAdrian Prantl <aprantl@apple.com>2015-06-29 23:03:47 +0000
commitab1243fe6c01ee7a28a0cb34dc60eaf24eafaf8f (patch)
treef5963f34d34701774537554b8fe7e56239f2bbc7 /llvm/lib/IR/Verifier.cpp
parent706b80d8965339496a4af13bdbcc5472ab809acc (diff)
downloadbcm5719-llvm-ab1243fe6c01ee7a28a0cb34dc60eaf24eafaf8f.tar.gz
bcm5719-llvm-ab1243fe6c01ee7a28a0cb34dc60eaf24eafaf8f.zip
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 llvm-svn: 241017
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r--llvm/lib/IR/Verifier.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 82cf811910d..3c61165768f 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -1017,6 +1017,11 @@ void Verifier::visitDINamespace(const DINamespace &N) {
Assert(isa<DIScope>(S), "invalid scope ref", &N, S);
}
+void Verifier::visitDIModule(const DIModule &N) {
+ Assert(N.getTag() == dwarf::DW_TAG_module, "invalid tag", &N);
+ Assert(!N.getName().empty(), "anonymous module", &N);
+}
+
void Verifier::visitDITemplateParameter(const DITemplateParameter &N) {
Assert(isTypeRef(N, N.getType()), "invalid type ref", &N, N.getType());
}
OpenPOWER on IntegriCloud