[llvm] r187014 - More constructor cleanup.
Eric Christopher
echristo at gmail.com
Tue Jul 23 18:06:22 PDT 2013
Author: echristo
Date: Tue Jul 23 20:06:21 2013
New Revision: 187014
URL: http://llvm.org/viewvc/llvm-project?rev=187014&view=rev
Log:
More constructor cleanup.
Move to a single constructor with a default argument and avoid
the check and nullification.
Modified:
llvm/trunk/include/llvm/DebugInfo.h
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=187014&r1=187013&r2=187014&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Tue Jul 23 20:06:21 2013
@@ -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); }
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=187014&r1=187013&r2=187014&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Tue Jul 23 20:06:21 2013
@@ -344,12 +344,6 @@ bool DIDescriptor::isImportedEntity() co
// 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;
More information about the llvm-commits
mailing list