diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:19:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-16 18:19:26 +0000 |
commit | 61753bf84796694f1165e333c3190cc02ea03ba1 (patch) | |
tree | 098546dcacfabbdee05ac793216998c7df7f8d8a /llvm/lib/ExecutionEngine/ExecutionEngine.cpp | |
parent | 770709befe9000505daf38f116e7bfb46e3db228 (diff) | |
download | bcm5719-llvm-61753bf84796694f1165e333c3190cc02ea03ba1.tar.gz bcm5719-llvm-61753bf84796694f1165e333c3190cc02ea03ba1.zip |
Add support for undef
llvm-svn: 17055
Diffstat (limited to 'llvm/lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index b239cc2a53e..208f8e2e834 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -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; |