aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 96ca54a711..3d190aa0f8 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!");