forked from OSchip/llvm-project
[AsmPrinter] Replace a reachable report_fatal_error with MCContext::reportError
This commit is contained in:
parent
8ffda237a6
commit
1635dea266
|
@ -534,8 +534,8 @@ void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
|
|||
|
||||
GVSym->redefineIfPossible();
|
||||
if (GVSym->isDefined() || GVSym->isVariable())
|
||||
report_fatal_error("symbol '" + Twine(GVSym->getName()) +
|
||||
"' is already defined");
|
||||
OutContext.reportError(SMLoc(), "symbol '" + Twine(GVSym->getName()) +
|
||||
"' is already defined");
|
||||
|
||||
if (MAI->hasDotTypeDotSizeDirective())
|
||||
OutStreamer->emitSymbolAttribute(EmittedSym, MCSA_ELF_TypeObject);
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
; RUN: not --crash llc < %s 2>&1 | FileCheck %s
|
||||
; RUN: not llc -filetype=null %s 2>&1 | FileCheck %s
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
module asm ".equiv var, __var"
|
||||
|
||||
@var = global i32 0
|
||||
; CHECK: symbol 'var' is already defined
|
||||
; CHECK: <unknown>:0: error: symbol 'var' is already defined
|
||||
; CHECK: <unknown>:0: error: invalid symbol redefinition
|
||||
|
|
Loading…
Reference in New Issue