Move the DIFile operand to DITypes from the 4th operand to the 2nd.
[oota-llvm.git] / include / llvm / DebugInfo.h
index a9d5a4b7b6623a3eec6e75df3acdb512d6a62e2b..4240b24359c94d710eec6891db1fe37beb621493 100644 (file)
@@ -241,9 +241,8 @@ namespace llvm {
     explicit DIType(const MDNode *N);
     explicit DIType() {}
 
-    DIScope getContext() const          { return getFieldAs<DIScope>(1); }
-    StringRef getName() const           { return getStringField(2);     }
-    DIFile getFile() const              { return getFieldAs<DIFile>(3); }
+    DIScope getContext() const          { return getFieldAs<DIScope>(2); }
+    StringRef getName() const           { return getStringField(3);     }
     unsigned getLineNumber() const      { return getUnsignedField(4); }
     uint64_t getSizeInBits() const      { return getUInt64Field(5); }
     uint64_t getAlignInBits() const     { return getUInt64Field(6); }
@@ -289,10 +288,10 @@ namespace llvm {
       return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
     }
     StringRef getDirectory() const  {
-      return getFieldAs<DIFile>(3).getDirectory();
+      return getFieldAs<DIFile>(1).getDirectory();
     }
     StringRef getFilename() const  {
-      return getFieldAs<DIFile>(3).getFilename();
+      return getFieldAs<DIFile>(1).getFilename();
     }
 
     /// isUnsignedDIType - Return true if type encoding is unsigned.