summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/IR/DIBuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index fbd19596377..2486ccef951 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -194,7 +194,7 @@ DIImportedEntity DIBuilder::createImportedDeclaration(DIScope Context,
unsigned Line, StringRef Name) {
// Make sure to use the unique identifier based metadata reference for
// types that have one.
- Value *V = Decl.isType() ? DIType(Decl).getRef() : Decl;
+ Value *V = Decl.isType() ? static_cast<Value*>(DIType(Decl).getRef()) : Decl;
return ::createImportedModule(VMContext, dwarf::DW_TAG_imported_declaration,
Context, V, Line, Name,
AllImportedModules);
OpenPOWER on IntegriCloud