mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-01 10:57:21 +00:00
Revert 133010. Self-hosted buildbot unhappy.
Apparently llvm itself generates undefined assembler local labels, causing self-hosting problems with this patch. Reverting until that's sorted out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c35dd25ab8
commit
6c3044db28
@ -39,9 +39,6 @@ namespace llvm {
|
|||||||
class MCContext {
|
class MCContext {
|
||||||
MCContext(const MCContext&); // DO NOT IMPLEMENT
|
MCContext(const MCContext&); // DO NOT IMPLEMENT
|
||||||
MCContext &operator=(const MCContext&); // DO NOT IMPLEMENT
|
MCContext &operator=(const MCContext&); // DO NOT IMPLEMENT
|
||||||
public:
|
|
||||||
typedef StringMap<MCSymbol*, BumpPtrAllocator&> SymbolTable;
|
|
||||||
private:
|
|
||||||
|
|
||||||
/// The MCAsmInfo for this target.
|
/// The MCAsmInfo for this target.
|
||||||
const MCAsmInfo &MAI;
|
const MCAsmInfo &MAI;
|
||||||
@ -55,7 +52,7 @@ namespace llvm {
|
|||||||
BumpPtrAllocator Allocator;
|
BumpPtrAllocator Allocator;
|
||||||
|
|
||||||
/// Symbols - Bindings of names to symbols.
|
/// Symbols - Bindings of names to symbols.
|
||||||
SymbolTable Symbols;
|
StringMap<MCSymbol*, BumpPtrAllocator&> Symbols;
|
||||||
|
|
||||||
/// UsedNames - Keeps tracks of names that were used both for used declared
|
/// UsedNames - Keeps tracks of names that were used both for used declared
|
||||||
/// and artificial symbols.
|
/// and artificial symbols.
|
||||||
@ -145,14 +142,6 @@ namespace llvm {
|
|||||||
/// LookupSymbol - Get the symbol for \p Name, or null.
|
/// LookupSymbol - Get the symbol for \p Name, or null.
|
||||||
MCSymbol *LookupSymbol(StringRef Name) const;
|
MCSymbol *LookupSymbol(StringRef Name) const;
|
||||||
|
|
||||||
/// getSymbols - Get a reference for the symbol table for clients that
|
|
||||||
/// want to, for example, iterate over all symbols. 'const' because we
|
|
||||||
/// still want any modifications to the table itself to use the MCContext
|
|
||||||
/// APIs.
|
|
||||||
const SymbolTable &getSymbols() const {
|
|
||||||
return Symbols;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// @name Section Management
|
/// @name Section Management
|
||||||
|
@ -84,7 +84,6 @@ private:
|
|||||||
AsmLexer Lexer;
|
AsmLexer Lexer;
|
||||||
MCContext &Ctx;
|
MCContext &Ctx;
|
||||||
MCStreamer &Out;
|
MCStreamer &Out;
|
||||||
const MCAsmInfo &MAI;
|
|
||||||
SourceMgr &SrcMgr;
|
SourceMgr &SrcMgr;
|
||||||
MCAsmParserExtension *GenericParser;
|
MCAsmParserExtension *GenericParser;
|
||||||
MCAsmParserExtension *PlatformParser;
|
MCAsmParserExtension *PlatformParser;
|
||||||
@ -136,7 +135,7 @@ public:
|
|||||||
virtual MCContext &getContext() { return Ctx; }
|
virtual MCContext &getContext() { return Ctx; }
|
||||||
virtual MCStreamer &getStreamer() { return Out; }
|
virtual MCStreamer &getStreamer() { return Out; }
|
||||||
|
|
||||||
virtual bool Warning(SMLoc L, const Twine &Msg);
|
virtual bool Warning(SMLoc L, const Twine &Meg);
|
||||||
virtual bool Error(SMLoc L, const Twine &Msg);
|
virtual bool Error(SMLoc L, const Twine &Msg);
|
||||||
|
|
||||||
const AsmToken &Lex();
|
const AsmToken &Lex();
|
||||||
@ -161,9 +160,8 @@ private:
|
|||||||
void HandleMacroExit();
|
void HandleMacroExit();
|
||||||
|
|
||||||
void PrintMacroInstantiations();
|
void PrintMacroInstantiations();
|
||||||
void PrintMessage(SMLoc Loc, const Twine &Msg, const char *Type,
|
void PrintMessage(SMLoc Loc, const Twine &Msg, const char *Type) const {
|
||||||
bool ShowLine = true) const {
|
SrcMgr.PrintMessage(Loc, Msg, Type);
|
||||||
SrcMgr.PrintMessage(Loc, Msg, Type, ShowLine);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// EnterIncludeFile - Enter the specified file. This returns true on failure.
|
/// EnterIncludeFile - Enter the specified file. This returns true on failure.
|
||||||
@ -339,7 +337,7 @@ enum { DEFAULT_ADDRSPACE = 0 };
|
|||||||
|
|
||||||
AsmParser::AsmParser(const Target &T, SourceMgr &_SM, MCContext &_Ctx,
|
AsmParser::AsmParser(const Target &T, SourceMgr &_SM, MCContext &_Ctx,
|
||||||
MCStreamer &_Out, const MCAsmInfo &_MAI)
|
MCStreamer &_Out, const MCAsmInfo &_MAI)
|
||||||
: Lexer(_MAI), Ctx(_Ctx), Out(_Out), MAI(_MAI), SrcMgr(_SM),
|
: Lexer(_MAI), Ctx(_Ctx), Out(_Out), SrcMgr(_SM),
|
||||||
GenericParser(new GenericAsmParser), PlatformParser(0),
|
GenericParser(new GenericAsmParser), PlatformParser(0),
|
||||||
CurBuffer(0), MacrosEnabled(true) {
|
CurBuffer(0), MacrosEnabled(true) {
|
||||||
Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer));
|
Lexer.setBuffer(SrcMgr.getMemoryBuffer(CurBuffer));
|
||||||
@ -468,25 +466,6 @@ bool AsmParser::Run(bool NoInitialTextSection, bool NoFinalize) {
|
|||||||
TokError("unassigned file number: " + Twine(i) + " for .file directives");
|
TokError("unassigned file number: " + Twine(i) + " for .file directives");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see that all assembler local symbols were actually defined.
|
|
||||||
// Targets that don't do subsections via symbols may not want this, though,
|
|
||||||
// so conservatively exclude them.
|
|
||||||
if (MAI.hasSubsectionsViaSymbols()) {
|
|
||||||
const MCContext::SymbolTable &Symbols = getContext().getSymbols();
|
|
||||||
for (MCContext::SymbolTable::const_iterator i = Symbols.begin(),
|
|
||||||
e = Symbols.end();
|
|
||||||
i != e; ++i) {
|
|
||||||
MCSymbol *Sym = i->getValue();
|
|
||||||
if (Sym->isTemporary() && !Sym->isDefined())
|
|
||||||
// FIXME: We would really like to refer back to where the symbol was
|
|
||||||
// first referenced for a source location. We need to add something
|
|
||||||
// to track that. Currently, we just point to the end of the file.
|
|
||||||
PrintMessage(getLexer().getLoc(), "assembler local symbol '" +
|
|
||||||
Sym->getName() + "' not defined", "error", false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Finalize the output stream if there are no errors and if the client wants
|
// Finalize the output stream if there are no errors and if the client wants
|
||||||
// us to.
|
// us to.
|
||||||
if (!HadError && !NoFinalize)
|
if (!HadError && !NoFinalize)
|
||||||
|
Loading…
Reference in New Issue
Block a user