More constructor cleanup.

Move to a single constructor with a default argument and avoid
the check and nullification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2013-07-24 01:06:21 +00:00
parent 78ac65f06b
commit e72a4d4843
2 changed files with 2 additions and 8 deletions

View File

@ -209,10 +209,10 @@ namespace llvm {
void printInternal(raw_ostream &OS) const;
public:
DIType(const MDNode *N = 0) : DIScope(N) {}
/// Verify - Verify that a type descriptor is well formed.
bool Verify() const;
explicit DIType(const MDNode *N);
explicit DIType() {}
DIScope getContext() const { return getFieldAs<DIScope>(2); }
StringRef getName() const { return getStringField(3); }

View File

@ -344,12 +344,6 @@ bool DIDescriptor::isImportedEntity() const {
// Simple Descriptor Constructors and other Methods
//===----------------------------------------------------------------------===//
DIType::DIType(const MDNode *N) : DIScope(N) {
if (!N) return;
if (!isType())
DbgNode = 0;
}
unsigned DIArray::getNumElements() const {
if (!DbgNode)
return 0;