summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCNullStreamer.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-10-05 16:42:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-10-05 16:42:21 +0000
commitac4ad25a00535210aba54961d5896cd8b93020ce (patch)
treef1114a31f0874d54c076210051d095844765ef33 /llvm/lib/MC/MCNullStreamer.cpp
parenta0d895733b09531436182f3623c21081153264f1 (diff)
downloadbcm5719-llvm-ac4ad25a00535210aba54961d5896cd8b93020ce.tar.gz
bcm5719-llvm-ac4ad25a00535210aba54961d5896cd8b93020ce.zip
Remove some really nasty uses of hasRawTextSupport.
When MC was first added, targets could use hasRawTextSupport to keep features working before they were added to the MC interface. The design goal of MC is to provide an uniform api for printing assembly and object files. Short of relaxations and other corner cases, a object file is just another representation of the assembly. It was never the intention that targets would keep doing things like if (hasRawTextSupport()) Set flags in one way. else Set flags in another way. When they do that they create two code paths and the object file is no longer just another representation of the assembly. This also then requires testing with llc -filetype=obj, which is extremelly brittle. This patch removes some of these hacks by replacing them with smaller ones. The ARM flag setting is trivial, so I just moved it to the constructor. For Mips, the patch adds two temporary hack directives that allow the assembly to represent the same things as the object file was already able to. The hope is that the mips developers will replace the hack directives with the same ones that gas uses and drop the -print-hack-directives flag. I will also try to implement a target streamer interface, so that we can move this out of the common code. In summary, for any new work, two rules of the thumb are * Don't use "llc -filetype=obj" in tests. * Don't add calls to hasRawTextSupport. llvm-svn: 192035
Diffstat (limited to 'llvm/lib/MC/MCNullStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCNullStreamer.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/MC/MCNullStreamer.cpp b/llvm/lib/MC/MCNullStreamer.cpp
index 2ddc4f0f71e..8d5da44a069 100644
--- a/llvm/lib/MC/MCNullStreamer.cpp
+++ b/llvm/lib/MC/MCNullStreamer.cpp
@@ -19,7 +19,7 @@ namespace {
class MCNullStreamer : public MCStreamer {
public:
- MCNullStreamer(MCContext &Context) : MCStreamer(SK_NullStreamer, Context) {}
+ MCNullStreamer(MCContext &Context) : MCStreamer(Context) {}
/// @name MCStreamer Interface
/// @{
@@ -109,13 +109,6 @@ namespace {
virtual void EmitCFIEndProcImpl(MCDwarfFrameInfo &Frame) {
RecordProcEnd(Frame);
}
-
- /// @}
-
- static bool classof(const MCStreamer *S) {
- return S->getKind() == SK_NullStreamer;
- }
-
};
}
OpenPOWER on IntegriCloud