mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Add some missing #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16517 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d9b6800f6
commit
aefd04b6d0
@ -26,6 +26,8 @@
|
|||||||
#include "llvm/Bytecode/Reader.h"
|
#include "llvm/Bytecode/Reader.h"
|
||||||
#include "llvm/Bytecode/WriteBytecodePass.h"
|
#include "llvm/Bytecode/WriteBytecodePass.h"
|
||||||
#include "llvm/Target/TargetData.h"
|
#include "llvm/Target/TargetData.h"
|
||||||
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
#include "llvm/Target/TargetMachineRegistry.h"
|
||||||
#include "llvm/Transforms/IPO.h"
|
#include "llvm/Transforms/IPO.h"
|
||||||
#include "llvm/Transforms/Scalar.h"
|
#include "llvm/Transforms/Scalar.h"
|
||||||
#include "llvm/Support/Linker.h"
|
#include "llvm/Support/Linker.h"
|
||||||
@ -82,6 +84,9 @@ namespace {
|
|||||||
Relink("r", cl::desc("Alias for -link-as-library"),
|
Relink("r", cl::desc("Alias for -link-as-library"),
|
||||||
cl::aliasopt(LinkAsLibrary));
|
cl::aliasopt(LinkAsLibrary));
|
||||||
|
|
||||||
|
cl::opt<const TargetMachineRegistry::Entry*, false, TargetNameParser>
|
||||||
|
MachineArch("march", cl::desc("Architecture to generate assembly for:"));
|
||||||
|
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
Native("native",
|
Native("native",
|
||||||
cl::desc("Generate a native binary instead of a shell script"));
|
cl::desc("Generate a native binary instead of a shell script"));
|
||||||
@ -184,7 +189,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n");
|
cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n");
|
||||||
sys::PrintStackTraceOnErrorSignal();
|
sys::PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
std::string ModuleID("gccld-output");
|
std::string ModuleID("llvm-ld-output");
|
||||||
std::auto_ptr<Module> Composite(new Module(ModuleID));
|
std::auto_ptr<Module> Composite(new Module(ModuleID));
|
||||||
|
|
||||||
// We always look first in the current directory when searching for libraries.
|
// We always look first in the current directory when searching for libraries.
|
||||||
@ -203,12 +208,11 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
|
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
|
||||||
return 1; // Error already printed
|
return 1; // Error already printed
|
||||||
|
|
||||||
|
// Link in all of the libraries next...
|
||||||
if (!LinkAsLibrary)
|
if (!LinkAsLibrary)
|
||||||
LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths,
|
LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths,
|
||||||
Verbose, Native);
|
Verbose, Native);
|
||||||
|
|
||||||
// Link in all of the libraries next...
|
|
||||||
|
|
||||||
// Create the output file.
|
// Create the output file.
|
||||||
std::string RealBytecodeOutput = OutputFilename;
|
std::string RealBytecodeOutput = OutputFilename;
|
||||||
if (!LinkAsLibrary) RealBytecodeOutput += ".bc";
|
if (!LinkAsLibrary) RealBytecodeOutput += ".bc";
|
||||||
@ -218,7 +222,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
"' for writing!");
|
"' for writing!");
|
||||||
|
|
||||||
// Ensure that the bytecode file gets removed from the disk if we get a
|
// Ensure that the bytecode file gets removed from the disk if we get a
|
||||||
// SIGINT signal.
|
// terminating signal.
|
||||||
sys::RemoveFileOnSignal(RealBytecodeOutput);
|
sys::RemoveFileOnSignal(RealBytecodeOutput);
|
||||||
|
|
||||||
// Generate the bytecode file.
|
// Generate the bytecode file.
|
||||||
|
Loading…
Reference in New Issue
Block a user