The current code mixes what are logically three separate components into one source file: frontend (argument parsing and invoking Clang), instrumentation in general, and specific implementations of instrumentation. As a start to refactoring the code, the frontend-related functions should be moved into a separate source file and a public API defined through which it invokes the other components.
The current code mixes what are logically three separate components into one source file: frontend (argument parsing and invoking Clang), instrumentation in general, and specific implementations of instrumentation. As a start to refactoring the code, the frontend-related functions should be moved into a separate source file and a public API defined through which it invokes the other components.