diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-10-20 04:24:12 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-10-20 04:24:12 +0000 |
commit | 2bf9b4c0d18dd03d967f3fd5bb6b5d156b1ed3a7 (patch) | |
tree | f078924c5b5ba712ea756475a952a58acaac2dc7 /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | 8f18917a9050e87c8f6ff84493f3eff8467378d2 (diff) | |
download | bcm5719-llvm-2bf9b4c0d18dd03d967f3fd5bb6b5d156b1ed3a7.tar.gz bcm5719-llvm-2bf9b4c0d18dd03d967f3fd5bb6b5d156b1ed3a7.zip |
[DEBUG INFO] Emit debug info for type used in explicit cast only.
Currently debug info for types used in explicit cast only is not emitted. It happened after a patch for better alignment handling. This patch fixes this bug.
Differential Revision: http://reviews.llvm.org/D13582
llvm-svn: 250795
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 1f4b1dcbe02..bbd04dd7514 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -636,6 +636,8 @@ public: } llvm::Constant *VisitCastExpr(CastExpr* E) { + if (const auto *ECE = dyn_cast<ExplicitCastExpr>(E)) + CGM.EmitExplicitCastExprType(ECE, CGF); Expr *subExpr = E->getSubExpr(); llvm::Constant *C = CGM.EmitConstantExpr(subExpr, subExpr->getType(), CGF); if (!C) return nullptr; |