summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bf7644a)
raw | patch | inline | side by side (parent: bf7644a)
author | Eric Christopher <echristo@gmail.com> | |
Wed, 24 Jul 2013 00:54:39 +0000 (00:54 +0000) | ||
committer | Eric Christopher <echristo@gmail.com> | |
Wed, 24 Jul 2013 00:54:39 +0000 (00:54 +0000) |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187013 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/DebugInfo.cpp | patch | blob | history |
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index c42a9a377f4fb3278331b4bb40e2c7f083b85032..c78b8c21c8bfe10cadc9d306c172260552c79d30 100644 (file)
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
bool DICompileUnit::Verify() const {
if (!isCompileUnit())
return false;
- StringRef N = getFilename();
- if (N.empty())
+
+ // Don't bother verifying the compilation directory or producer string
+ // as those could be empty.
+ if (getFilename().empty())
return false;
- // It is possible that directory and produce string is empty.
+
return DbgNode->getNumOperands() == 13;
}