mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Straighten out any triple strings passed on the command line before
they hit the rest of the system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3dd08734c1
commit
75ebbceeed
@ -104,8 +104,8 @@ int main(int argc, char **argv) {
|
||||
// If we have an override, set it and then track the triple we want Modules
|
||||
// to use.
|
||||
if (!OverrideTriple.empty()) {
|
||||
TargetTriple.setTriple(OverrideTriple);
|
||||
outs() << "Override triple set to '" << OverrideTriple << "'\n";
|
||||
TargetTriple.setTriple(Triple::normalize(OverrideTriple));
|
||||
outs() << "Override triple set to '" << TargetTriple.getTriple() << "'\n";
|
||||
}
|
||||
|
||||
if (MemoryLimit < 0) {
|
||||
|
@ -223,7 +223,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
// If we are supposed to override the target triple, do so now.
|
||||
if (!TargetTriple.empty())
|
||||
mod.setTargetTriple(TargetTriple);
|
||||
mod.setTargetTriple(Triple::normalize(TargetTriple));
|
||||
|
||||
Triple TheTriple(mod.getTargetTriple());
|
||||
if (TheTriple.getTriple().empty())
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Bitcode/ReaderWriter.h"
|
||||
#include "llvm/CodeGen/LinkAllCodegenComponents.h"
|
||||
#include "llvm/ExecutionEngine/GenericValue.h"
|
||||
@ -157,7 +158,7 @@ int main(int argc, char **argv, char * const *envp) {
|
||||
|
||||
// If we are supposed to override the target triple, do so now.
|
||||
if (!TargetTriple.empty())
|
||||
Mod->setTargetTriple(TargetTriple);
|
||||
Mod->setTargetTriple(Triple::normalize(TargetTriple));
|
||||
|
||||
CodeGenOpt::Level OLvl = CodeGenOpt::Default;
|
||||
switch (OptLevel) {
|
||||
|
@ -390,6 +390,7 @@ int main(int argc, char **argv) {
|
||||
llvm::InitializeAllDisassemblers();
|
||||
|
||||
cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n");
|
||||
TripleName = Triple::normalize(TripleName);
|
||||
|
||||
switch (Action) {
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user