diff --git a/toolchain/lexer/lex_helpers.h b/toolchain/lexer/lex_helpers.h index e9b53a79e681..f45c5af27b20 100644 --- a/toolchain/lexer/lex_helpers.h +++ b/toolchain/lexer/lex_helpers.h @@ -5,8 +5,6 @@ #ifndef TOOLCHAIN_LEXER_LEX_HELPERS_H_ #define TOOLCHAIN_LEXER_LEX_HELPERS_H_ -#include - #include "toolchain/diagnostics/diagnostic_emitter.h" namespace Carbon { diff --git a/toolchain/semantics/BUILD b/toolchain/semantics/BUILD index acbdfbdfd61b..eede08fd1f32 100644 --- a/toolchain/semantics/BUILD +++ b/toolchain/semantics/BUILD @@ -22,5 +22,6 @@ cc_test( "//toolchain/parser:parse_tree", "//toolchain/source:source_buffer", "@com_google_googletest//:gtest_main", + "@llvm-project//llvm:Support", ], ) diff --git a/toolchain/semantics/semantics_test.cpp b/toolchain/semantics/semantics_test.cpp index 4f700e2f9096..ecae3b4ad01d 100644 --- a/toolchain/semantics/semantics_test.cpp +++ b/toolchain/semantics/semantics_test.cpp @@ -7,8 +7,7 @@ #include #include -#include - +#include "llvm/ADT/Optional.h" #include "toolchain/diagnostics/diagnostic_emitter.h" #include "toolchain/lexer/tokenized_buffer.h" #include "toolchain/parser/parse_tree.h" @@ -26,9 +25,9 @@ class ParseTreeTest : public ::testing::Test { return Semantics::Analyze(*parse_tree, consumer); } - std::optional source_buffer; - std::optional tokenized_buffer; - std::optional parse_tree; + llvm::Optional source_buffer; + llvm::Optional tokenized_buffer; + llvm::Optional parse_tree; DiagnosticConsumer& consumer = ConsoleDiagnosticConsumer(); }; diff --git a/toolchain/source/source_buffer.cpp b/toolchain/source/source_buffer.cpp index 238a9bdf0ad8..3babd50c6d48 100644 --- a/toolchain/source/source_buffer.cpp +++ b/toolchain/source/source_buffer.cpp @@ -12,11 +12,11 @@ #include #include #include -#include #include #include #include "common/check.h" +#include "llvm/ADT/Optional.h" #include "llvm/ADT/ScopeExit.h" #include "llvm/Support/Error.h"