diff options
| author | Eric Christopher <echristo@gmail.com> | 2013-07-24 00:54:39 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2013-07-24 00:54:39 +0000 |
| commit | 9d9eee4c4e60e3e4f3a67ca0e1bebed605712b22 (patch) | |
| tree | 2a84d8b73c7fe5c73c9495503691ac5321610448 /llvm/lib/IR | |
| parent | 9880157ead8c2b3294d81c36a321101dc6e54849 (diff) | |
| download | bcm5719-llvm-9d9eee4c4e60e3e4f3a67ca0e1bebed605712b22.tar.gz bcm5719-llvm-9d9eee4c4e60e3e4f3a67ca0e1bebed605712b22.zip | |
Collapse logic and move and reword comment for clarity.
llvm-svn: 187013
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index c42a9a377f4..c78b8c21c8b 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -417,10 +417,12 @@ bool DIType::isUnsignedDIType() { 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; } |

