Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // Go through the bitcode file line by line
  2. String callerFunction = "";
  3. int callerUses = 0;
  4. while ((line = reader.readLine())!= null) {
  5. if (line.contains("Call")) {
  6. // Check the caller function name and its uses
  7. callerUses = Integer.parseInt(line.split("=")[1]);
  8. callerFunction = (callerUses == 0)? "null": line.split("'")[1];
  9.  
  10. } else if (line.contains("'")) {
  11. // Check the callee function name
  12. String calleeFunction = line.split("'")[1];
  13. // Add the caller/callee pair to the hashtable
  14. output.append(callerFunction + "(" + callerUses + " uses):" + calleeFunction + "\n");
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement