umnsec / mlta

TypeDive: Multi-Layer Type Analysis (MLTA) for Refining Indirect-Call Targets
MIT License
76 stars 20 forks source link

runOnModule returning true #1

Closed akorb closed 2 years ago

akorb commented 2 years ago

LLVM's documentation says about runOnModule:

It should return true if the module was modified by the transformation and false otherwise.

In IRDumper.cpp, each compiled module is written to a file, yet not modified. Still, the function returns true: https://github.com/umnsec/mlta/blob/587f6c7bc16de7e848db828c441ce68880faab90/IRDumper/src/lib/IRDumper.cpp#L26

Is this on purpose?

kengiter commented 2 years ago

In this particular case, returning true or false should have no effect; but to be consistent with the LLVM documentation, returning false seems to be better.