forked from OSchip/llvm-project
Return "Unknown" when using the value of a function pointer whose value
is symbolic. llvm-svn: 47463
This commit is contained in:
parent
35519d51d6
commit
eb653882de
|
@ -156,7 +156,11 @@ RVal ValueStateManager::GetRVal(ValueState St, const LVal& LV, QualType T) {
|
|||
const lval::SymbolVal& SV = cast<lval::SymbolVal>(LV);
|
||||
assert (T.getTypePtr());
|
||||
|
||||
if (T.getTypePtr()->isPointerType())
|
||||
// Punt on "symbolic" function pointers.
|
||||
if (T->isFunctionType())
|
||||
return UnknownVal();
|
||||
|
||||
if (T->isPointerType())
|
||||
return lval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol()));
|
||||
else
|
||||
return nonlval::SymbolVal(SymMgr.getContentsOfSymbol(SV.getSymbol()));
|
||||
|
|
Loading…
Reference in New Issue