projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop bunch of half-working stuff in the ext_weak linkage support.
[oota-llvm.git]
/
lib
/
VMCore
/
ConstantFold.cpp
diff --git
a/lib/VMCore/ConstantFold.cpp
b/lib/VMCore/ConstantFold.cpp
index 5f7cbcd0b60b5cd50a664a1db2b47247372c66a6..ff4d897e54a8b945d1d49ff959a424f49452b943 100644
(file)
--- a/
lib/VMCore/ConstantFold.cpp
+++ b/
lib/VMCore/ConstantFold.cpp
@@
-161,17
+161,12
@@
static Constant *FoldBitCast(Constant *V, const Type *DestTy) {
// Otherwise, can't fold this (vector?)
return 0;
}
// Otherwise, can't fold this (vector?)
return 0;
}
-
+
// Handle ConstantFP input.
// Handle ConstantFP input.
- if (const ConstantFP *FP = dyn_cast<ConstantFP>(V))
{
+ if (const ConstantFP *FP = dyn_cast<ConstantFP>(V))
// FP -> Integral.
// FP -> Integral.
- if (DestTy == Type::Int32Ty) {
- return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
- } else {
- assert(DestTy == Type::Int64Ty && "only support f32/f64 for now!");
- return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
- }
- }
+ return ConstantInt::get(FP->getValueAPF().bitcastToAPInt());
+
return 0;
}
return 0;
}