diff --git a/toolchain/lower/context.cpp b/toolchain/lower/context.cpp index 4b01daa48251..db8b4a165f2d 100644 --- a/toolchain/lower/context.cpp +++ b/toolchain/lower/context.cpp @@ -5,6 +5,7 @@ #include "toolchain/lower/context.h" #include "clang/Basic/SourceManager.h" +#include "clang/CodeGen/ModuleBuilder.h" #include "common/check.h" #include "common/growing_range.h" #include "common/raw_string_ostream.h" diff --git a/toolchain/lower/context.h b/toolchain/lower/context.h index 74819ed6f8f5..6a61f04ac2b1 100644 --- a/toolchain/lower/context.h +++ b/toolchain/lower/context.h @@ -20,6 +20,10 @@ #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst_namer.h" +namespace clang { +class CodeGenerator; +} + namespace Carbon::Lower { class FileContext; diff --git a/toolchain/lower/file_context.h b/toolchain/lower/file_context.h index e634901100fe..b135a2f517ff 100644 --- a/toolchain/lower/file_context.h +++ b/toolchain/lower/file_context.h @@ -5,8 +5,6 @@ #ifndef CARBON_TOOLCHAIN_LOWER_FILE_CONTEXT_H_ #define CARBON_TOOLCHAIN_LOWER_FILE_CONTEXT_H_ -#include "clang/CodeGen/ModuleBuilder.h" -#include "clang/Lex/PreprocessorOptions.h" #include "toolchain/lower/context.h" #include "toolchain/lower/specific_coalescer.h" #include "toolchain/lower/type.h" @@ -15,6 +13,11 @@ #include "toolchain/sem_ir/ids.h" #include "toolchain/sem_ir/inst_namer.h" +namespace clang { +class CodeGenerator; +class FunctionDecl; +} // namespace clang + namespace Carbon::Lower { // Information about how a given function declaration is lowered.