[llvm-commits] CVS: llvm/utils/TableGen/TableGen.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Jul 12 23:11:58 PDT 2004
Changes in directory llvm/utils/TableGen:
TableGen.cpp updated: 1.27 -> 1.28
---
Log message:
Make tblgen not try to be smart. This is better handled in makefiles if
at all. Patch contributed by Vladimir Prus!
---
Diffs of the changes: (+3 -14)
Index: llvm/utils/TableGen/TableGen.cpp
diff -u llvm/utils/TableGen/TableGen.cpp:1.27 llvm/utils/TableGen/TableGen.cpp:1.28
--- llvm/utils/TableGen/TableGen.cpp:1.27 Thu May 27 00:36:52 2004
+++ llvm/utils/TableGen/TableGen.cpp Tue Jul 13 01:11:46 2004
@@ -421,18 +421,15 @@
std::ostream *Out = &std::cout;
if (OutputFilename != "-") {
- // Output to a .tmp file, because we don't actually want to overwrite the
- // output file unless the generated file is different or the specified file
- // does not exist.
- Out = new std::ofstream((OutputFilename+".tmp").c_str());
+ Out = new std::ofstream(OutputFilename.c_str());
if (!Out->good()) {
- std::cerr << argv[0] << ": error opening " << OutputFilename << ".tmp!\n";
+ std::cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
return 1;
}
// Make sure the file gets removed if *gasp* tablegen crashes...
- RemoveFileOnSignal(OutputFilename+".tmp");
+ RemoveFileOnSignal(OutputFilename);
}
try {
@@ -492,14 +489,6 @@
if (Out != &std::cout) {
delete Out; // Close the file
-
- // Now that we have generated the result, check to see if we either don't
- // have the requested file, or if the requested file is different than the
- // file we generated. If so, move the generated file over the requested
- // file. Otherwise, just remove the file we just generated, so 'make'
- // doesn't try to regenerate tons of dependencies.
- //
- MoveFileOverIfUpdated(OutputFilename+".tmp", OutputFilename);
}
return 0;
}
More information about the llvm-commits
mailing list