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/Address.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'clang/lib/CodeGen/Address.h') diff --git a/clang/lib/CodeGen/Address.h b/clang/lib/CodeGen/Address.h index b1aa6307e36..9d145fa26b5 100644 --- a/clang/lib/CodeGen/Address.h +++ b/clang/lib/CodeGen/Address.h @@ -116,4 +116,11 @@ namespace llvm { } } +namespace clang { + // Make our custom isa and cast available in namespace clang, to mirror + // what we do for LLVM's versions in Basic/LLVM.h. + using llvm::isa; + using llvm::cast; +} + #endif -- cgit v1.2.3