This is no longer needed. Global variables with undef initializers can be

initialized to anything, including garbage.

llvm-svn: 20010
This commit is contained in:
Chris Lattner
2005-02-02 20:50:50 +00:00
parent d4528ea031
commit 45a6a18393

View 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);