summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index e408e9ff9ed..4eb906269ae 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -123,10 +123,11 @@ public:
return EmitSizeAlignOf(E->getArgumentType(), E->getType(), E->isSizeOf());
}
Value *VisitAddrLabelExpr(const AddrLabelExpr *E) {
- Value *V = llvm::ConstantInt::get(llvm::Type::Int32Ty,
- CGF.GetIDForAddrOfLabel(E->getLabel()));
- return Builder.CreateIntToPtr(V,
- llvm::PointerType::getUnqual(llvm::Type::Int8Ty));
+ llvm::Value *V =
+ llvm::ConstantInt::get(llvm::Type::Int32Ty,
+ CGF.GetIDForAddrOfLabel(E->getLabel()));
+
+ return Builder.CreateIntToPtr(V, ConvertType(E->getType()));
}
// l-values.
OpenPOWER on IntegriCloud