[llvm] r230872 - Fix buildbot issues for MDScope::getFile() after r230871
Duncan P. N. Exon Smith
dexonsmith at apple.com
Sat Feb 28 13:58:10 PST 2015
Author: dexonsmith
Date: Sat Feb 28 15:58:10 2015
New Revision: 230872
URL: http://llvm.org/viewvc/llvm-project?rev=230872&view=rev
Log:
Fix buildbot issues for MDScope::getFile() after r230871
I hope this extra cast will make everyone happy...
Modified:
llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=230872&r1=230871&r2=230872&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Sat Feb 28 15:58:10 2015
@@ -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) {
More information about the llvm-commits
mailing list