[NFC][ELF] Wrap invokeELFT in do { } while (0) so it behaves as a function (#150119)
The current implementation is dangerous if used in contexts that need a
single statement, since invokeELFT(...); is in fact two statements, a
switch statement and an empty statement.