Skip to content

Commit

Permalink
llvm 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanradanov committed Feb 27, 2024
1 parent e66aef3 commit f5f7d75
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1285,8 +1285,14 @@ static void emitHeaderIncludes(const RecordKeeper &recordKeeper,
Twine("Could not read file ") + filename_in);
auto &contents = contents_or_err.get();
#else
auto buf = llvm::SrcMgr.AddIncludeFile(
filename_in, pattern->getFieldLoc("filename_in"), included_file);
auto buf =
llvm::SrcMgr.AddIncludeFile(filename_in,
#if LLVM_VERSION_MAJOR >= 12
pattern->getFieldLoc("filename_in"),
#else
pattern->getLoc()[1],
#endif
included_file);
if (!buf)
PrintFatalError(pattern->getLoc(),
Twine("Could not read file ") + filename_in);
Expand Down

0 comments on commit f5f7d75

Please sign in to comment.