[llvm] r234908 - [Orc] Reapply r234815, outputting via stdout instead.
Lang Hames
lhames at gmail.com
Tue Apr 14 09:58:05 PDT 2015
Author: lhames
Date: Tue Apr 14 11:58:05 2015
New Revision: 234908
URL: http://llvm.org/viewvc/llvm-project?rev=234908&view=rev
Log:
[Orc] Reapply r234815, outputting via stdout instead.
Modified:
llvm/trunk/test/ExecutionEngine/OrcLazy/hello.ll
llvm/trunk/tools/lli/OrcLazyJIT.cpp
Modified: llvm/trunk/test/ExecutionEngine/OrcLazy/hello.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ExecutionEngine/OrcLazy/hello.ll?rev=234908&r1=234907&r2=234908&view=diff
==============================================================================
--- llvm/trunk/test/ExecutionEngine/OrcLazy/hello.ll (original)
+++ llvm/trunk/test/ExecutionEngine/OrcLazy/hello.ll Tue Apr 14 11:58:05 2015
@@ -1,7 +1,8 @@
-; RUN: lli -jit-kind=orc-lazy %s | FileCheck %s
+; RUN: lli -jit-kind=orc-lazy -orc-lazy-debug=funcs-to-stdout %s | FileCheck %s
;
; CHECK: Hello
-; CHECK-NEXT: Goodbye
+; CHECK: [ {{.*}}main$orc_body ]
+; CHECK: Goodbye
%class.Foo = type { i8 }
Modified: llvm/trunk/tools/lli/OrcLazyJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/OrcLazyJIT.cpp?rev=234908&r1=234907&r2=234908&view=diff
==============================================================================
--- llvm/trunk/tools/lli/OrcLazyJIT.cpp (original)
+++ llvm/trunk/tools/lli/OrcLazyJIT.cpp Tue Apr 14 11:58:05 2015
@@ -17,7 +17,7 @@ using namespace llvm;
namespace {
- enum class DumpKind { NoDump, DumpFuncsToStdErr, DumpModsToStdErr,
+ enum class DumpKind { NoDump, DumpFuncsToStdOut, DumpModsToStdErr,
DumpModsToDisk };
cl::opt<DumpKind> OrcDumpKind("orc-lazy-debug",
@@ -26,9 +26,9 @@ namespace {
cl::values(
clEnumValN(DumpKind::NoDump, "no-dump",
"Don't dump anything."),
- clEnumValN(DumpKind::DumpFuncsToStdErr,
- "funcs-to-stderr",
- "Dump function names to stderr."),
+ clEnumValN(DumpKind::DumpFuncsToStdOut,
+ "funcs-to-stdout",
+ "Dump function names to stdout."),
clEnumValN(DumpKind::DumpModsToStdErr,
"mods-to-stderr",
"Dump modules to stderr."),
@@ -63,21 +63,22 @@ OrcLazyJIT::TransformFtor OrcLazyJIT::cr
case DumpKind::NoDump:
return [](std::unique_ptr<Module> M) { return std::move(M); };
- case DumpKind::DumpFuncsToStdErr:
+ case DumpKind::DumpFuncsToStdOut:
return [](std::unique_ptr<Module> M) {
- dbgs() << "[ ";
+ printf("[ ");
for (const auto &F : *M) {
if (F.isDeclaration())
continue;
- if (F.hasName())
- dbgs() << F.getName() << " ";
- else
- dbgs() << "<anon> ";
+ if (F.hasName()) {
+ std::string Name(F.getName());
+ printf("%s ", Name.c_str());
+ } else
+ printf("<anon> ");
}
- dbgs() << "]\n";
+ printf("]\n");
return std::move(M);
};
More information about the llvm-commits
mailing list