summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/IR/DebugInfoMetadata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/IR/DebugInfoMetadata.h b/llvm/include/llvm/IR/DebugInfoMetadata.h
index 1f47f8a1cc3..07cb56d8328 100644
--- a/llvm/include/llvm/IR/DebugInfoMetadata.h
+++ b/llvm/include/llvm/IR/DebugInfoMetadata.h
@@ -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) {
OpenPOWER on IntegriCloud