From f96889b4306986709cf0c279924ab09165e360b2 Mon Sep 17 00:00:00 2001 From: c8ef Date: Tue, 7 Oct 2025 12:18:08 +0800 Subject: [PATCH] [NFC] Fix deprecated use of lookupTarget in Kaleidoscope --- llvm/examples/Kaleidoscope/Chapter8/toy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp index 739b8954aa8b2..1575211978b96 100644 --- a/llvm/examples/Kaleidoscope/Chapter8/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter8/toy.cpp @@ -1228,7 +1228,8 @@ int main() { TheModule->setTargetTriple(Triple(TargetTriple)); std::string Error; - auto Target = TargetRegistry::lookupTarget(TargetTriple, Error); + auto Target = + TargetRegistry::lookupTarget(TheModule->getTargetTriple(), Error); // Print an error and exit if we couldn't find the requested target. // This generally occurs if we've forgotten to initialise the