mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Reorder #includes
Make sure that we veryify the result before writing it out! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8177 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -6,10 +6,11 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Transforms/Utils/Linker.h"
|
#include "llvm/Module.h"
|
||||||
|
#include "llvm/Analysis/Verifier.h"
|
||||||
#include "llvm/Bytecode/Reader.h"
|
#include "llvm/Bytecode/Reader.h"
|
||||||
#include "llvm/Bytecode/Writer.h"
|
#include "llvm/Bytecode/Writer.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Transforms/Utils/Linker.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
#include "Support/Signals.h"
|
#include "Support/Signals.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -125,6 +126,11 @@ int main(int argc, char **argv) {
|
|||||||
RemoveFileOnSignal(OutputFilename);
|
RemoveFileOnSignal(OutputFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (verifyModule(*Composite.get())) {
|
||||||
|
std::cerr << argv[0] << ": linked module is broken!\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (Verbose) std::cerr << "Writing bytecode...\n";
|
if (Verbose) std::cerr << "Writing bytecode...\n";
|
||||||
WriteBytecodeToFile(Composite.get(), *Out);
|
WriteBytecodeToFile(Composite.get(), *Out);
|
||||||
|
|
||||||
|
@ -6,10 +6,11 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Transforms/Utils/Linker.h"
|
#include "llvm/Module.h"
|
||||||
|
#include "llvm/Analysis/Verifier.h"
|
||||||
#include "llvm/Bytecode/Reader.h"
|
#include "llvm/Bytecode/Reader.h"
|
||||||
#include "llvm/Bytecode/Writer.h"
|
#include "llvm/Bytecode/Writer.h"
|
||||||
#include "llvm/Module.h"
|
#include "llvm/Transforms/Utils/Linker.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
#include "Support/Signals.h"
|
#include "Support/Signals.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@ -125,6 +126,11 @@ int main(int argc, char **argv) {
|
|||||||
RemoveFileOnSignal(OutputFilename);
|
RemoveFileOnSignal(OutputFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (verifyModule(*Composite.get())) {
|
||||||
|
std::cerr << argv[0] << ": linked module is broken!\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (Verbose) std::cerr << "Writing bytecode...\n";
|
if (Verbose) std::cerr << "Writing bytecode...\n";
|
||||||
WriteBytecodeToFile(Composite.get(), *Out);
|
WriteBytecodeToFile(Composite.get(), *Out);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user