From 4186005edc9a083e568eab8df308ff647b84c3de Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 24 Jun 2014 22:45:16 +0000 Subject: Print a=b as an assignment. In assembly the expression a=b is parsed as an assignment, so it should be printed as one. This remove a truly horrible hack for producing a label with "a=.". It would be used by codegen but would never be reached by the asm parser. Sorry I missed this when it was first committed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211639 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCAsmInfo.h | 6 +++--- include/llvm/MC/MCELFStreamer.h | 1 - include/llvm/MC/MCObjectStreamer.h | 1 - include/llvm/MC/MCStreamer.h | 2 -- include/llvm/MC/MCWinCOFFStreamer.h | 1 - 5 files changed, 3 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h index 55dc40afe5..4c0624521d 100644 --- a/include/llvm/MC/MCAsmInfo.h +++ b/include/llvm/MC/MCAsmInfo.h @@ -116,8 +116,8 @@ protected: /// This is appended to emitted labels. Defaults to ":" const char *LabelSuffix; - /// This is appended to emitted labels. Defaults to ":" - const char *DebugLabelSuffix; + // Print the EH begin symbol with an assignment. Defaults to false. + bool UseAssignmentForEHBegin; /// This prefix is used for globals like constant pool entries that are /// completely private to the .s file and should not have names in the .o @@ -415,7 +415,7 @@ public: const char *getCommentString() const { return CommentString; } const char *getLabelSuffix() const { return LabelSuffix; } - const char *getDebugLabelSuffix() const { return DebugLabelSuffix; } + bool useAssignmentForEHBegin() const { return UseAssignmentForEHBegin; } const char *getPrivateGlobalPrefix() const { return PrivateGlobalPrefix; } bool hasLinkerPrivateGlobalPrefix() const { return LinkerPrivateGlobalPrefix[0] != '\0'; diff --git a/include/llvm/MC/MCELFStreamer.h b/include/llvm/MC/MCELFStreamer.h index be39128dbd..66729fe014 100644 --- a/include/llvm/MC/MCELFStreamer.h +++ b/include/llvm/MC/MCELFStreamer.h @@ -48,7 +48,6 @@ public: void ChangeSection(const MCSection *Section, const MCExpr *Subsection) override; void EmitLabel(MCSymbol *Symbol) override; - void EmitDebugLabel(MCSymbol *Symbol) override; void EmitAssemblerFlag(MCAssemblerFlag Flag) override; void EmitThumbFunc(MCSymbol *Func) override; void EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) override; diff --git a/include/llvm/MC/MCObjectStreamer.h b/include/llvm/MC/MCObjectStreamer.h index a8ba23ac00..4772b748e6 100644 --- a/include/llvm/MC/MCObjectStreamer.h +++ b/include/llvm/MC/MCObjectStreamer.h @@ -87,7 +87,6 @@ public: /// @{ void EmitLabel(MCSymbol *Symbol) override; - void EmitDebugLabel(MCSymbol *Symbol) override; void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override; void EmitValueImpl(const MCExpr *Value, unsigned Size, const SMLoc &Loc = SMLoc()) override; diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index cd1fa9b6a8..417a21ff06 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -393,8 +393,6 @@ public: // add the section we're emitting it to later. virtual void EmitLabel(MCSymbol *Symbol); - virtual void EmitDebugLabel(MCSymbol *Symbol); - virtual void EmitEHSymAttributes(const MCSymbol *Symbol, MCSymbol *EHSymbol); /// EmitAssemblerFlag - Note in the output the specified @p Flag. diff --git a/include/llvm/MC/MCWinCOFFStreamer.h b/include/llvm/MC/MCWinCOFFStreamer.h index 34e39bb0a6..ac978fe6ee 100644 --- a/include/llvm/MC/MCWinCOFFStreamer.h +++ b/include/llvm/MC/MCWinCOFFStreamer.h @@ -35,7 +35,6 @@ public: void InitSections() override; void EmitLabel(MCSymbol *Symbol) override; - void EmitDebugLabel(MCSymbol *Symbol) override; void EmitAssemblerFlag(MCAssemblerFlag Flag) override; void EmitThumbFunc(MCSymbol *Func) override; bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override; -- cgit v1.2.3