diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-07-13 06:11:46 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-07-13 06:11:46 +0000 |
| commit | 8e30a4dfc5226637472f536e714fa0b639e49ad6 (patch) | |
| tree | 9aab5f427b70055dd93e427d5f849a030b5c893f /llvm | |
| parent | 35e24774ebb5e2f6f1e9de94fb86fa58bed9f265 (diff) | |
| download | bcm5719-llvm-8e30a4dfc5226637472f536e714fa0b639e49ad6.tar.gz bcm5719-llvm-8e30a4dfc5226637472f536e714fa0b639e49ad6.zip | |
Make tblgen not try to be smart. This is better handled in makefiles if
at all. Patch contributed by Vladimir Prus!
llvm-svn: 14784
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/utils/TableGen/TableGen.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/llvm/utils/TableGen/TableGen.cpp b/llvm/utils/TableGen/TableGen.cpp index d89d3dbb004..2409d37196b 100644 --- a/llvm/utils/TableGen/TableGen.cpp +++ b/llvm/utils/TableGen/TableGen.cpp @@ -421,18 +421,15 @@ int main(int argc, char **argv) { 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 @@ int main(int argc, char **argv) { 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; } |

