Skip to content

Commit a9c6c1d

Browse files
authored
[NFC] Fix deprecated use of lookupTarget in Kaleidoscope (#162220)
Related: 009da92
1 parent cf85ec5 commit a9c6c1d

File tree

1 file changed

+2
-1
lines changed
  • llvm/examples/Kaleidoscope/Chapter8

1 file changed

+2
-1
lines changed

llvm/examples/Kaleidoscope/Chapter8/toy.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,8 @@ int main() {
12281228
TheModule->setTargetTriple(Triple(TargetTriple));
12291229

12301230
std::string Error;
1231-
auto Target = TargetRegistry::lookupTarget(TargetTriple, Error);
1231+
auto Target =
1232+
TargetRegistry::lookupTarget(TheModule->getTargetTriple(), Error);
12321233

12331234
// Print an error and exit if we couldn't find the requested target.
12341235
// This generally occurs if we've forgotten to initialise the

0 commit comments

Comments
 (0)