From d0637bd1c6c2fd014317a686c4b8733ee30e7ea2 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 5 Nov 2015 21:16:22 +0000 Subject: PR25368: Replace workaround for build failure with modules enabled with a fix for the root cause. The 'using llvm::isa;' declaration in Basic/LLVM.h only pulls the declarations of llvm::isa that were declared prior to it into namespace clang. In a modules build, this is a hermetic set of just the declarations from LLVM. In a non-modules build, we happened to also pull the declaration from lib/CodeGen/Address.h into namespace clang, which made the code in question accidentally compile. llvm-svn: 252211 --- clang/lib/CodeGen/CGExprConstant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGExprConstant.cpp') diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index c97739915da..bbd04dd7514 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1038,7 +1038,7 @@ public: unsigned Type = cast(E)->getIdentType(); if (CGF) { LValue Res = CGF->EmitPredefinedLValue(cast(E)); - return llvm::cast(Res.getAddress()); + return cast(Res.getAddress()); } else if (Type == PredefinedExpr::PrettyFunction) { return CGM.GetAddrOfConstantCString("top level", ".tmp"); } -- cgit v1.2.3