aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-07-24 01:21:02 +0000
committerEric Christopher <echristo@gmail.com>2013-07-24 01:21:02 +0000
commit2d3adad723653e4acd3d1b3f7fcfd2691acccb73 (patch)
tree672107118bb2f246c3cd3700585edae5dccceaea
parente72a4d4843f8f42ac6dfda6511ad6a0a57468077 (diff)
downloadexternal_llvm-2d3adad723653e4acd3d1b3f7fcfd2691acccb73.zip
external_llvm-2d3adad723653e4acd3d1b3f7fcfd2691acccb73.tar.gz
external_llvm-2d3adad723653e4acd3d1b3f7fcfd2691acccb73.tar.bz2
Remove unnecessary constructors as the default conversions will handle
all enumerated cases. Reformat the rest of the existing constructors to match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187015 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/DebugInfo.h21
-rw-r--r--lib/IR/DebugInfo.cpp18
2 files changed, 5 insertions, 34 deletions
diff --git a/include/llvm/DebugInfo.h b/include/llvm/DebugInfo.h
index de0eda0..689b3dd 100644
--- a/include/llvm/DebugInfo.h
+++ b/include/llvm/DebugInfo.h
@@ -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); }
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index b99f6d5..4b72bf3 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -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() ||