[llvm-commits] CVS: llvm/tools/lli/lli.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Dec 15 21:00:32 PST 2005
Changes in directory llvm/tools/lli:
lli.cpp updated: 1.52 -> 1.53
---
Log message:
provide an option to override the target triple in a module from the commandline.
---
Diffs of the changes: (+7 -1)
lli.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)
Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.52 llvm/tools/lli/lli.cpp:1.53
--- llvm/tools/lli/lli.cpp:1.52 Fri Dec 2 13:00:22 2005
+++ llvm/tools/lli/lli.cpp Thu Dec 15 23:00:21 2005
@@ -36,7 +36,9 @@
cl::opt<bool> ForceInterpreter("force-interpreter",
cl::desc("Force interpretation: disable JIT"),
cl::init(false));
-
+ cl::opt<std::string>
+ TargetTriple("triple", cl::desc("Override target triple for module"));
+
cl::opt<std::string>
FakeArgv0("fake-argv0",
cl::desc("Override the 'argv[0]' value passed into the executing"
@@ -62,6 +64,10 @@
exit(1);
}
+ // If we are supposed to override the target triple, do so now.
+ if (!TargetTriple.empty())
+ MP->getModule()->setTargetTriple(TargetTriple);
+
ExecutionEngine *EE = ExecutionEngine::create(MP, ForceInterpreter);
assert(EE && "Couldn't create an ExecutionEngine, not even an interpreter?");
More information about the llvm-commits
mailing list