Add support for undef

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-10-16 18:19:26 +00:00
parent a79e7cca0d
commit bd1d382cc4
3 changed files with 8 additions and 3 deletions

View File

@@ -440,7 +440,9 @@ GenericValue ExecutionEngine::LoadValueFromMemory(GenericValue *Ptr,
// specified memory location...
//
void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
if (Init->getType()->isFirstClassType()) {
if (isa<UndefValue>(Init)) {
return;
} else if (Init->getType()->isFirstClassType()) {
GenericValue Val = getConstantValue(Init);
StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType());
return;