]> granicus.if.org Git - llvm/commit
[MC] Refactor emitELFSize to make usage more consistent. NFC.
authorDan Gohman <dan433584@gmail.com>
Thu, 1 Dec 2016 23:39:08 +0000 (23:39 +0000)
committerDan Gohman <dan433584@gmail.com>
Thu, 1 Dec 2016 23:39:08 +0000 (23:39 +0000)
commit14b34deb6887ca5bea98263f0a3f16b5419394f7
tree5c3edfc2c7d6028ab61f6080de63661f4d95cff7
parenta11b564b77a1ddef8f198363ac6ea1d99180839c
[MC] Refactor emitELFSize to make usage more consistent. NFC.

Move the cast<MCSymbolELF> inside emitELFSize, so that:
 - it's done in one place instead of at each call
 - it's more consistent with similar functions like EmitCOFFSafeSEH
 - ambiguity between cast<> and dyn_cast<> is avoided (which also
   eliminates an unnecessary dyn_cast call)

This also makes it easier to experiment with using ".size" directives on
non-ELF targets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288437 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCELFStreamer.h
include/llvm/MC/MCStreamer.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/MC/MCAsmStreamer.cpp
lib/MC/MCELFStreamer.cpp
lib/MC/MCStreamer.cpp
lib/Target/XCore/XCoreAsmPrinter.cpp