From 8ab50da589fd2692052dcb85edf06d1d2d8da42c Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 30 Sep 2024 11:20:32 -0700 Subject: [PATCH] Include in Toy Lexer examples. (#110449) These files all use `strtod` - make sure to include a proper header for this function. Otherwise, building MLIR fails on some systems after the recent commit 1b5f6916199ce09244cdb52c6911f2028e6ca95a which removed inclusion of `` and thus broke transitive inclusion of `` in these headers. --- mlir/examples/toy/Ch1/include/toy/Lexer.h | 1 + mlir/examples/toy/Ch2/include/toy/Lexer.h | 1 + mlir/examples/toy/Ch3/include/toy/Lexer.h | 1 + mlir/examples/toy/Ch4/include/toy/Lexer.h | 1 + mlir/examples/toy/Ch5/include/toy/Lexer.h | 1 + mlir/examples/toy/Ch6/include/toy/Lexer.h | 1 + mlir/examples/toy/Ch7/include/toy/Lexer.h | 1 + 7 files changed, 7 insertions(+) diff --git a/mlir/examples/toy/Ch1/include/toy/Lexer.h b/mlir/examples/toy/Ch1/include/toy/Lexer.h index ecbb3b4e0e58..d420a7ebbf3b 100644 --- a/mlir/examples/toy/Ch1/include/toy/Lexer.h +++ b/mlir/examples/toy/Ch1/include/toy/Lexer.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringRef.h" +#include #include #include diff --git a/mlir/examples/toy/Ch2/include/toy/Lexer.h b/mlir/examples/toy/Ch2/include/toy/Lexer.h index 3c59cd9805fe..22822cc10595 100644 --- a/mlir/examples/toy/Ch2/include/toy/Lexer.h +++ b/mlir/examples/toy/Ch2/include/toy/Lexer.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringRef.h" +#include #include #include diff --git a/mlir/examples/toy/Ch3/include/toy/Lexer.h b/mlir/examples/toy/Ch3/include/toy/Lexer.h index 3c59cd9805fe..22822cc10595 100644 --- a/mlir/examples/toy/Ch3/include/toy/Lexer.h +++ b/mlir/examples/toy/Ch3/include/toy/Lexer.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringRef.h" +#include #include #include diff --git a/mlir/examples/toy/Ch4/include/toy/Lexer.h b/mlir/examples/toy/Ch4/include/toy/Lexer.h index 3c59cd9805fe..22822cc10595 100644 --- a/mlir/examples/toy/Ch4/include/toy/Lexer.h +++ b/mlir/examples/toy/Ch4/include/toy/Lexer.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringRef.h" +#include #include #include diff --git a/mlir/examples/toy/Ch5/include/toy/Lexer.h b/mlir/examples/toy/Ch5/include/toy/Lexer.h index 3c59cd9805fe..22822cc10595 100644 --- a/mlir/examples/toy/Ch5/include/toy/Lexer.h +++ b/mlir/examples/toy/Ch5/include/toy/Lexer.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringRef.h" +#include #include #include diff --git a/mlir/examples/toy/Ch6/include/toy/Lexer.h b/mlir/examples/toy/Ch6/include/toy/Lexer.h index 3c59cd9805fe..22822cc10595 100644 --- a/mlir/examples/toy/Ch6/include/toy/Lexer.h +++ b/mlir/examples/toy/Ch6/include/toy/Lexer.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringRef.h" +#include #include #include diff --git a/mlir/examples/toy/Ch7/include/toy/Lexer.h b/mlir/examples/toy/Ch7/include/toy/Lexer.h index a3fde91a357a..f022c2f48ac8 100644 --- a/mlir/examples/toy/Ch7/include/toy/Lexer.h +++ b/mlir/examples/toy/Ch7/include/toy/Lexer.h @@ -15,6 +15,7 @@ #include "llvm/ADT/StringRef.h" +#include #include #include