mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-04 22:28:27 +00:00
[CodeGen] prevent abnormal on invalid attributes
Currently, when an invalid attribute is encountered on processing a .s file, clang will abort due to llvm_unreachable. Invalid user input should not cause an abnormal termination of the compiler. Change the interface to return a boolean to indicate the failure as a first step towards improving hanlding of malformed user input to clang. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188047 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -738,9 +738,10 @@ namespace {
|
||||
// FIXME: should we handle aliases?
|
||||
markDefined(*Symbol);
|
||||
}
|
||||
virtual void EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) {
|
||||
virtual bool EmitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) {
|
||||
if (Attribute == MCSA_Global)
|
||||
markGlobal(*Symbol);
|
||||
return true;
|
||||
}
|
||||
virtual void EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
|
||||
uint64_t Size , unsigned ByteAlignment) {
|
||||
|
Reference in New Issue
Block a user