From: Chris Lattner Date: Mon, 21 Apr 2003 22:44:36 +0000 (+0000) Subject: Make stderr, stdout, stdin work with LLI X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=59ee0eeffd650adee31ea1f67649a0ee59dd2330;p=oota-llvm.git Make stderr, stdout, stdin work with LLI git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5832 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 96ca54a7112..3d190aa0f81 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -213,6 +213,12 @@ void ExecutionEngine::emitGlobals() { DEBUG(std::cerr << "Global '" << I->getName() << "' -> " << (void*)GlobalAddress[I] << "\n"); + } else if (I->getName() == "stdout") { + GlobalAddress[I] = &stdout; + } else if (I->getName() == "stderr") { + GlobalAddress[I] = &stderr; + } else if (I->getName() == "stdin") { + GlobalAddress[I] = &stdin; } else { std::cerr << "Global: " << I->getName() << "\n"; assert(0 && "References to external globals not handled yet!");