Skip to content

Commit 36117e6

Browse files
committed
Support for .NET unsigned byte type
1 parent 13ea512 commit 36117e6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

soot-infoflow/src/soot/jimple/infoflow/typing/TypeUtils.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@
2121
import soot.SootClass;
2222
import soot.SootMethod;
2323
import soot.Type;
24+
import soot.UByteType;
2425
import soot.VoidType;
2526
import soot.jimple.infoflow.InfoflowManager;
2627
import soot.jimple.infoflow.data.AccessPath;
28+
import soot.options.Options;
2729

2830
/**
2931
* Class containing various utility methods for dealing with type information
@@ -294,9 +296,16 @@ else if (type.equals("char"))
294296
t = CharType.v();
295297
else if (type.equals("short"))
296298
t = ShortType.v();
297-
else if (type.equals("byte"))
299+
else if (type.equals("sbyte"))
298300
t = ByteType.v();
299-
else if (type.equals("void"))
301+
else if (type.equals("ubyte"))
302+
t = UByteType.v();
303+
else if (type.equals("byte")) {
304+
if (Options.v().src_prec() == Options.src_prec_dotnet)
305+
t = UByteType.v();
306+
else
307+
t = ByteType.v();
308+
} else if (type.equals("void"))
300309
t = VoidType.v();
301310
else {
302311
// Do not create types for stuff that isn't loaded in the current

0 commit comments

Comments
 (0)