Fix buildbot issues for MDScope::getFile() after r230871
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Feb 2015 21:58:10 +0000 (21:58 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Feb 2015 21:58:10 +0000 (21:58 +0000)
I hope this extra cast will make everyone happy...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230872 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/DebugInfoMetadata.h

index 1f47f8a1cc3f35f41161a5a4098f8254d37e8099..07cb56d8328f80ae562c1ab1f2b1214d42d91d0b 100644 (file)
@@ -337,7 +337,8 @@ public:
   /// this.  Otherwise, return the first operand, which is where all other
   /// subclasses store their file pointer.
   Metadata *getFile() const {
-    return isa<MDFile>(this) ? const_cast<MDScope *>(this) : getOperand(0);
+    return isa<MDFile>(this) ? const_cast<MDScope *>(this)
+                             : static_cast<Metadata *>(getOperand(0));
   }
 
   static bool classof(const Metadata *MD) {