[PATCH] D32330: X86: Don't emit zero-byte functions on Windows
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 17:48:42 PDT 2017
MatzeB added a comment.
Sounds like a good story :)
- We have various MachineInstr that do not result in actual code getting created (DEBUG_INFO, Labels, etc.) this wouldn't catch them.
- There is a very similar situation handled in AsmPrinter.cpp already around line 1049:
// If the function is empty and the object file uses .subsections_via_symbols,
// then we need to emit *something* to the function body to prevent the
// labels from collapsing together. Just emit a noop.
maybe you can do some refactoring there to do the COFF empty function handling as well?
https://reviews.llvm.org/D32330
More information about the llvm-commits
mailing list