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.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index e37d56f2cc..9b51e3c798 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -55,8 +55,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
return getConstantValue(Op);
// Handle a cast of pointer to any integral type...
- if (isa<PointerType>(Op->getType()) &&
- (C->getType() == Type::LongTy || C->getType() == Type::ULongTy))
+ if (isa<PointerType>(Op->getType()) && C->getType()->isIntegral())
return getConstantValue(Op);
// Handle cast of long to pointer...