mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
Make tblgen not try to be smart. This is better handled in makefiles if
at all. Patch contributed by Vladimir Prus! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14784 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -421,18 +421,15 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
std::ostream *Out = &std::cout;
|
std::ostream *Out = &std::cout;
|
||||||
if (OutputFilename != "-") {
|
if (OutputFilename != "-") {
|
||||||
// Output to a .tmp file, because we don't actually want to overwrite the
|
Out = new std::ofstream(OutputFilename.c_str());
|
||||||
// output file unless the generated file is different or the specified file
|
|
||||||
// does not exist.
|
|
||||||
Out = new std::ofstream((OutputFilename+".tmp").c_str());
|
|
||||||
|
|
||||||
if (!Out->good()) {
|
if (!Out->good()) {
|
||||||
std::cerr << argv[0] << ": error opening " << OutputFilename << ".tmp!\n";
|
std::cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the file gets removed if *gasp* tablegen crashes...
|
// Make sure the file gets removed if *gasp* tablegen crashes...
|
||||||
RemoveFileOnSignal(OutputFilename+".tmp");
|
RemoveFileOnSignal(OutputFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -492,14 +489,6 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (Out != &std::cout) {
|
if (Out != &std::cout) {
|
||||||
delete Out; // Close the file
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user