[llvm-commits] [llvm] r82335 - /llvm/trunk/include/llvm/Analysis/DebugInfo.h

Daniel Dunbar daniel at zuster.org
Sat Sep 19 13:40:29 PDT 2009


Author: ddunbar
Date: Sat Sep 19 15:40:28 2009
New Revision: 82335

URL: http://llvm.org/viewvc/llvm-project?rev=82335&view=rev
Log:
Prefer super class constructor to explicit initialization.

Modified:
    llvm/trunk/include/llvm/Analysis/DebugInfo.h

Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=82335&r1=82334&r2=82335&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Sat Sep 19 15:40:28 2009
@@ -142,8 +142,7 @@
   /// DICompileUnit - A wrapper for a compile unit.
   class DICompileUnit : public DIScope {
   public:
-    explicit DICompileUnit(MDNode *N = 0) {
-      DbgNode = N;
+    explicit DICompileUnit(MDNode *N = 0) : DIScope(N) {
       if (DbgNode && !isCompileUnit())
         DbgNode = 0;
     }
@@ -353,8 +352,7 @@
   /// DISubprogram - This is a wrapper for a subprogram (e.g. a function).
   class DISubprogram : public DIScope {
   public:
-    explicit DISubprogram(MDNode *N = 0) {
-      DbgNode = N;
+    explicit DISubprogram(MDNode *N = 0) : DIScope(N) {
       if (DbgNode && !isSubprogram())
         DbgNode = 0;
     }
@@ -459,8 +457,7 @@
   /// DILexicalBlock - This is a wrapper for a lexical block.
   class DILexicalBlock : public DIScope {
   public:
-    explicit DILexicalBlock(MDNode *N = 0) {
-      DbgNode = N;
+    explicit DILexicalBlock(MDNode *N = 0) : DIScope(N) {
       if (DbgNode && !isLexicalBlock())
         DbgNode = 0;
     }
@@ -478,7 +475,7 @@
   /// is not associated with any DWARF tag.
   class DILocation : public DIDescriptor {
   public:
-    explicit DILocation(MDNode *L) { DbgNode = L; }
+    explicit DILocation(MDNode *N) : DIDescriptor(N) { ; }
 
     unsigned getLineNumber() const     { return getUnsignedField(0); }
     unsigned getColumnNumber() const   { return getUnsignedField(1); }





More information about the llvm-commits mailing list