[llvm] r187002 - Debug Info: clean up.
Manman Ren
manman.ren at gmail.com
Tue Jul 23 16:07:38 PDT 2013
Author: mren
Date: Tue Jul 23 18:07:38 2013
New Revision: 187002
URL: http://llvm.org/viewvc/llvm-project?rev=187002&view=rev
Log:
Debug Info: clean up.
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=187002&r1=187001&r2=187002&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Tue Jul 23 18:07:38 2013
@@ -661,9 +661,7 @@ MDNode *DISubprogram::getVariablesNodes(
}
DIArray DISubprogram::getVariables() const {
- if (MDNode *T = getNodeField(DbgNode, 18))
- return DIArray(T);
- return DIArray();
+ return DIArray(getNodeField(DbgNode, 18));
}
Value *DITemplateValueParameter::getValue() const {
@@ -686,27 +684,21 @@ DIArray DICompileUnit::getEnumTypes() co
if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = getNodeField(DbgNode, 7))
- return DIArray(N);
- return DIArray();
+ return DIArray(getNodeField(DbgNode, 7));
}
DIArray DICompileUnit::getRetainedTypes() const {
if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = getNodeField(DbgNode, 8))
- return DIArray(N);
- return DIArray();
+ return DIArray(getNodeField(DbgNode, 8));
}
DIArray DICompileUnit::getSubprograms() const {
if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = getNodeField(DbgNode, 9))
- return DIArray(N);
- return DIArray();
+ return DIArray(getNodeField(DbgNode, 9));
}
@@ -714,18 +706,14 @@ DIArray DICompileUnit::getGlobalVariable
if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = getNodeField(DbgNode, 10))
- return DIArray(N);
- return DIArray();
+ return DIArray(getNodeField(DbgNode, 10));
}
DIArray DICompileUnit::getImportedEntities() const {
if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = getNodeField(DbgNode, 11))
- return DIArray(N);
- return DIArray();
+ return DIArray(getNodeField(DbgNode, 11));
}
/// fixupSubprogramName - Replace contains special characters used
More information about the llvm-commits
mailing list