Advertisement
FedorS

filter-LLVM-ir-print.pl

Mar 15th, 2018
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.71 KB | None | 0 0
  1. #!/usr/bin/env perl
  2. while(<>) {
  3.   if (/^\*\*\* IR Dump/../^\*\*\* END OF \*\*\* IR Dump/) {
  4.     if (/^\*\*\* IR Dump/) {
  5.         print "#START\n";
  6.         print "commit refs/heads/module-ir\n";
  7.         print "committer Wasnt me <wasnt.me@here> now\n";
  8.         print "data <<END_OF_COMMIT_MESSAGE\n";
  9.         $name = s/^\*\*\* //r;
  10.        
  11.         print $name,"\n";
  12.         print "IR automatically stored into git.\n";
  13.         print "END_OF_COMMIT_MESSAGE\n";
  14.         print "M 644 inline module-ir.ll\n";
  15.         print "data <<END_OF_MODULE_IR\n";
  16.         next;
  17.     }
  18.     if (/^\*\*\* END OF \*\*\* IR Dump/) {
  19.         print "#END\n";
  20.         print "END_OF_MODULE_IR\n";
  21.         print "progress committed\n";
  22.         next;
  23.     }
  24.     print
  25.   }
  26. }
  27. print "done\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement