This is no longer needed. Global variables with undef initializers can be
authorChris Lattner <sabre@nondot.org>
Wed, 2 Feb 2005 20:50:50 +0000 (20:50 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 2 Feb 2005 20:50:50 +0000 (20:50 +0000)
initialized to anything, including garbage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20010 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/ExecutionEngine.cpp

index 8810b91b8ac796a235c9726175a41b9670fccb63..d6fb1710cce87617e0e546d961650778bd62e6a8 100644 (file)
@@ -450,8 +450,6 @@ GenericValue ExecutionEngine::LoadValueFromMemory(GenericValue *Ptr,
 //
 void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
   if (isa<UndefValue>(Init)) {
-    // FIXME: THIS SHOULD NOT BE NEEDED.
-    memset(Addr, 0, (size_t)getTargetData().getTypeSize(Init->getType()));
     return;
   } else if (Init->getType()->isFirstClassType()) {
     GenericValue Val = getConstantValue(Init);