[llvm-commits] [llvm] r112344 - in /llvm/trunk/tools: bugpoint/bugpoint.cpp llc/llc.cpp lli/lli.cpp llvm-mc/llvm-mc.cpp
Duncan Sands
baldrick at free.fr
Fri Aug 27 18:30:02 PDT 2010
Author: baldrick
Date: Fri Aug 27 20:30:02 2010
New Revision: 112344
URL: http://llvm.org/viewvc/llvm-project?rev=112344&view=rev
Log:
Straighten out any triple strings passed on the command line before
they hit the rest of the system.
Modified:
llvm/trunk/tools/bugpoint/bugpoint.cpp
llvm/trunk/tools/llc/llc.cpp
llvm/trunk/tools/lli/lli.cpp
llvm/trunk/tools/llvm-mc/llvm-mc.cpp
Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=112344&r1=112343&r2=112344&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/bugpoint.cpp (original)
+++ llvm/trunk/tools/bugpoint/bugpoint.cpp Fri Aug 27 20:30:02 2010
@@ -104,8 +104,8 @@
// 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) {
Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=112344&r1=112343&r2=112344&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Fri Aug 27 20:30:02 2010
@@ -223,7 +223,7 @@
// 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())
Modified: llvm/trunk/tools/lli/lli.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=112344&r1=112343&r2=112344&view=diff
==============================================================================
--- llvm/trunk/tools/lli/lli.cpp (original)
+++ llvm/trunk/tools/lli/lli.cpp Fri Aug 27 20:30:02 2010
@@ -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 @@
// 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) {
Modified: llvm/trunk/tools/llvm-mc/llvm-mc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mc/llvm-mc.cpp?rev=112344&r1=112343&r2=112344&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mc/llvm-mc.cpp (original)
+++ llvm/trunk/tools/llvm-mc/llvm-mc.cpp Fri Aug 27 20:30:02 2010
@@ -390,6 +390,7 @@
llvm::InitializeAllDisassemblers();
cl::ParseCommandLineOptions(argc, argv, "llvm machine code playground\n");
+ TripleName = Triple::normalize(TripleName);
switch (Action) {
default:
More information about the llvm-commits
mailing list