mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 01:15:36 +00:00
minor cleanups, use copy ctor instead of manually doing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22285 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
85141583cd
commit
cbb34a76a9
@ -42,7 +42,7 @@ OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename"));
|
|||||||
static cl::opt<bool> Force("f", cl::desc("Overwrite output files"));
|
static cl::opt<bool> Force("f", cl::desc("Overwrite output files"));
|
||||||
|
|
||||||
static cl::opt<const TargetMachineRegistry::Entry*, false, TargetNameParser>
|
static cl::opt<const TargetMachineRegistry::Entry*, false, TargetNameParser>
|
||||||
MArch("march", cl::desc("Architecture to generate assembly for:"));
|
MArch("march", cl::desc("Architecture to generate code for:"));
|
||||||
|
|
||||||
// GetFileNameRoot - Helper function to get the basename of a filename...
|
// GetFileNameRoot - Helper function to get the basename of a filename...
|
||||||
static inline std::string
|
static inline std::string
|
||||||
@ -97,8 +97,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
// Build up all of the passes that we want to do to the module...
|
// Build up all of the passes that we want to do to the module...
|
||||||
PassManager Passes;
|
PassManager Passes;
|
||||||
Passes.add(new TargetData("llc", TD.isLittleEndian(), TD.getPointerSize(),
|
Passes.add(new TargetData(TD));
|
||||||
TD.getPointerAlignment(), TD.getDoubleAlignment()));
|
|
||||||
|
|
||||||
// Figure out where we are going to send the output...
|
// Figure out where we are going to send the output...
|
||||||
std::ostream *Out = 0;
|
std::ostream *Out = 0;
|
||||||
@ -153,7 +152,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask the target to add backend passes as necessary
|
// Ask the target to add backend passes as necessary.
|
||||||
if (Target.addPassesToEmitFile(Passes, *Out, TargetMachine::AssemblyFile)) {
|
if (Target.addPassesToEmitFile(Passes, *Out, TargetMachine::AssemblyFile)) {
|
||||||
std::cerr << argv[0] << ": target '" << Target.getName()
|
std::cerr << argv[0] << ": target '" << Target.getName()
|
||||||
<< "' does not support static compilation!\n";
|
<< "' does not support static compilation!\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user