[llvm] r187013 - Collapse logic and move and reword comment for clarity.
Eric Christopher
echristo at gmail.com
Tue Jul 23 17:54:39 PDT 2013
Author: echristo
Date: Tue Jul 23 19:54:39 2013
New Revision: 187013
URL: http://llvm.org/viewvc/llvm-project?rev=187013&view=rev
Log:
Collapse logic and move and reword comment for clarity.
Modified:
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=187013&r1=187012&r2=187013&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Tue Jul 23 19:54:39 2013
@@ -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;
}
More information about the llvm-commits
mailing list