[llvm] r187015 - Remove unnecessary constructors as the default conversions will handle
Eric Christopher
echristo at gmail.com
Tue Jul 23 18:21:02 PDT 2013
Author: echristo
Date: Tue Jul 23 20:21:02 2013
New Revision: 187015
URL: http://llvm.org/viewvc/llvm-project?rev=187015&view=rev
Log:
Remove unnecessary constructors as the default conversions will handle
all enumerated cases. Reformat the rest of the existing constructors to
match.
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=187015&r1=187014&r2=187015&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Tue Jul 23 20:21:02 2013
@@ -89,14 +89,7 @@ namespace llvm {
void replaceFunctionField(unsigned Elt, Function *F);
public:
- explicit DIDescriptor() : DbgNode(0) {}
- explicit DIDescriptor(const MDNode *N) : DbgNode(N) {}
- explicit DIDescriptor(const DIFile F);
- explicit DIDescriptor(const DISubprogram F);
- explicit DIDescriptor(const DILexicalBlockFile F);
- explicit DIDescriptor(const DILexicalBlock F);
- explicit DIDescriptor(const DIVariable F);
- explicit DIDescriptor(const DIType F);
+ explicit DIDescriptor(const MDNode *N = 0) : DbgNode(N) {}
bool Verify() const;
@@ -165,8 +158,7 @@ namespace llvm {
/// DIArray - This descriptor holds an array of descriptors.
class DIArray : public DIDescriptor {
public:
- explicit DIArray(const MDNode *N = 0)
- : DIDescriptor(N) {}
+ explicit DIArray(const MDNode *N = 0) : DIDescriptor(N) {}
unsigned getNumElements() const;
DIDescriptor getElement(unsigned Idx) const {
@@ -289,8 +281,7 @@ namespace llvm {
void printInternal(raw_ostream &OS) const;
public:
- explicit DIDerivedType(const MDNode *N = 0)
- : DIType(N) {}
+ explicit DIDerivedType(const MDNode *N = 0) : DIType(N) {}
DIType getTypeDerivedFrom() const { return getFieldAs<DIType>(9); }
@@ -326,8 +317,7 @@ namespace llvm {
friend class DIDescriptor;
void printInternal(raw_ostream &OS) const;
public:
- explicit DICompositeType(const MDNode *N = 0)
- : DIDerivedType(N) {}
+ explicit DICompositeType(const MDNode *N = 0) : DIDerivedType(N) {}
DIArray getTypeArray() const { return getFieldAs<DIArray>(10); }
void setTypeArray(DIArray Elements, DIArray TParams = DIArray());
@@ -570,8 +560,7 @@ namespace llvm {
friend class DIDescriptor;
void printInternal(raw_ostream &OS) const;
public:
- explicit DIVariable(const MDNode *N = 0)
- : DIDescriptor(N) {}
+ explicit DIVariable(const MDNode *N = 0) : DIDescriptor(N) {}
DIScope getContext() const { return getFieldAs<DIScope>(1); }
StringRef getName() const { return getStringField(2); }
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=187015&r1=187014&r2=187015&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Tue Jul 23 20:21:02 2013
@@ -34,24 +34,6 @@ using namespace llvm::dwarf;
// DIDescriptor
//===----------------------------------------------------------------------===//
-DIDescriptor::DIDescriptor(const DIFile F) : DbgNode(F.DbgNode) {
-}
-
-DIDescriptor::DIDescriptor(const DISubprogram F) : DbgNode(F.DbgNode) {
-}
-
-DIDescriptor::DIDescriptor(const DILexicalBlockFile F) : DbgNode(F.DbgNode) {
-}
-
-DIDescriptor::DIDescriptor(const DILexicalBlock F) : DbgNode(F.DbgNode) {
-}
-
-DIDescriptor::DIDescriptor(const DIVariable F) : DbgNode(F.DbgNode) {
-}
-
-DIDescriptor::DIDescriptor(const DIType F) : DbgNode(F.DbgNode) {
-}
-
bool DIDescriptor::Verify() const {
return DbgNode &&
(DIDerivedType(DbgNode).Verify() ||
More information about the llvm-commits
mailing list