Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Go through the bitcode file line by line
- String callerFunction = "";
- int callerUses = 0;
- while ((line = reader.readLine())!= null) {
- if (line.contains("Call")) {
- // Check the caller function name and its uses
- callerUses = Integer.parseInt(line.split("=")[1]);
- callerFunction = (callerUses == 0)? "null": line.split("'")[1];
- } else if (line.contains("'")) {
- // Check the callee function name
- String calleeFunction = line.split("'")[1];
- // Add the caller/callee pair to the hashtable
- output.append(callerFunction + "(" + callerUses + " uses):" + calleeFunction + "\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement