Commit 6505e9db authored by Cristian Cadar's avatar Cristian Cadar Committed by Dan Liew
Browse files

Patch by Dan Liew improving the description of getZExtValue (see discussion at...

Patch by Dan Liew improving the description of getZExtValue (see discussion at http://keeda.stanford.edu/pipermail/klee-dev/2012-September/000928.html)

git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@166573 91177308-0d34-0410-b5e6-96231b3b80d8

Conflicts:
	include/klee/Expr.h
parent 2762cdb8
......@@ -395,8 +395,12 @@ public:
/// getZExtValue - Return the constant value for a limited number of bits.
///
/// This routine should be used in situations where the width of the constant
/// is known to be limited to a certain number of bits.
///\param bits - optional parameter that can be used to check that the
///number of bits used by this constant is <= to the parameter
///value. This is useful for checking that type casts won't truncate
///useful bits.
///
/// Example: unit8_t byte= (unit8_t) constant->getZExtValue(8);
uint64_t getZExtValue(unsigned bits = 64) const {
assert(getWidth() <= bits && "Value may be out of range!");
return value.getZExtValue();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment