Skip to content

Commit

Permalink
clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanradanov committed Feb 27, 2024
1 parent 89a9541 commit 2dc9431
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,8 @@ static void emitHeaderIncludes(const RecordKeeper &recordKeeper,
os << "const char* include_headers[][2] = {\n";
bool seen = false;
{
const auto &patterns = recordKeeper.getAllDerivedDefinitions("InlineHeader");
const auto &patterns =
recordKeeper.getAllDerivedDefinitions("InlineHeader");
for (Record *pattern : patterns) {
if (seen)
os << ",\n";
Expand All @@ -1277,9 +1278,10 @@ static void emitHeaderIncludes(const RecordKeeper &recordKeeper,
std::string filename_in = pattern->getValueAsString("filename_in").str();
std::string included_file;
auto contents = llvm::SrcMgr.OpenIncludeFile(filename_in, included_file);
//llvm::MemoryBuffer::getFile(filename_in, /*IsText=*/true);
// llvm::MemoryBuffer::getFile(filename_in, /*IsText=*/true);
if (!contents)
PrintFatalError(pattern->getLoc(), Twine("Could not read file ") + filename_in);
PrintFatalError(pattern->getLoc(),
Twine("Could not read file ") + filename_in);
os << "{\"" << filename_out << "\"\n,";
os << "R\"(" << contents.get()->getBuffer() << ")\"\n";
os << "}";
Expand Down

0 comments on commit 2dc9431

Please sign in to comment.