projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b702b8
)
Fix bug: Regression/Other/2002-03-11-ExprAssertion.ll
author
Chris Lattner
<sabre@nondot.org>
Tue, 1 Jul 2003 21:08:52 +0000
(21:08 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 1 Jul 2003 21:08:52 +0000
(21:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7046
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/Expressions.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/Expressions.cpp
b/lib/Analysis/Expressions.cpp
index b9a1b01dbc9fbafc345073ea9b9321fd9969c390..9b305bbe4097ea32d1700e001ed4f691ff021480 100644
(file)
--- a/
lib/Analysis/Expressions.cpp
+++ b/
lib/Analysis/Expressions.cpp
@@
-317,7
+317,9
@@
ExprType ClassifyExpression(Value *Expr) {
if (isa<PointerType>(DestTy))
DestTy = Type::ULongTy; // Pointer types are represented as ulong
- if (!Src.getExprType(0)->isLosslesslyConvertibleTo(DestTy)) {
+ const Type *SrcValTy = Src.getExprType(0);
+ if (!SrcValTy) return I;
+ if (!SrcValTy->isLosslesslyConvertibleTo(DestTy)) {
if (Src.ExprTy != ExprType::Constant)
return I; // Converting cast, and not a constant value...
}