mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 14:42:37 +00:00
Add value store to be shared across compile stages. (#3311)
This updates lexing to use the data. I'll do checking separately, just to split changes. Note the ValueStore structure is also set up such that SemIR::File can use it for other fields. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
1 parent
629c63c7d1
commit
d13f76e001
26 files changed
+389
-227
No files matched your search
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "common/check.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "toolchain/base/value_store.h"
|
||||
#include "toolchain/diagnostics/null_diagnostics.h"
|
||||
#include "toolchain/lex/tokenized_buffer.h"
|
||||
|
||||
@@ -33,7 +34,9 @@ extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data,
|
||||
auto source =
|
||||
SourceBuffer::CreateFromFile(fs, TestFileName, NullDiagnosticConsumer());
|
||||
|
||||
auto buffer = Lex::TokenizedBuffer::Lex(*source, NullDiagnosticConsumer());
|
||||
SharedValueStores value_stores;
|
||||
auto buffer = Lex::TokenizedBuffer::Lex(value_stores, *source,
|
||||
NullDiagnosticConsumer());
|
||||
if (buffer.has_errors()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user