diff options
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBase.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBase.cpp b/llvm/lib/CodeGen/RegAllocBase.cpp index 980a675..50addcb 100644 --- a/llvm/lib/CodeGen/RegAllocBase.cpp +++ b/llvm/lib/CodeGen/RegAllocBase.cpp @@ -200,10 +200,9 @@ MCPhysReg RegAllocBase::getErrorAssignment(const TargetRegisterClass &RC, ArrayRef<MCPhysReg> RawRegs = RC.getRegisters(); if (EmitError) { - DiagnosticInfoRegAllocFailure DI( + Context.diagnose(DiagnosticInfoRegAllocFailure( "no registers from class available to allocate", Fn, - CtxMI ? CtxMI->getDebugLoc() : DiagnosticLocation()); - Context.diagnose(DI); + CtxMI ? CtxMI->getDebugLoc() : DiagnosticLocation())); } assert(!RawRegs.empty() && "register classes cannot have no registers"); @@ -215,10 +214,9 @@ MCPhysReg RegAllocBase::getErrorAssignment(const TargetRegisterClass &RC, CtxMI->emitInlineAsmError( "inline assembly requires more registers than available"); } else { - DiagnosticInfoRegAllocFailure DI( + Context.diagnose(DiagnosticInfoRegAllocFailure( "ran out of registers during register allocation", Fn, - CtxMI ? CtxMI->getDebugLoc() : DiagnosticLocation()); - Context.diagnose(DI); + CtxMI ? CtxMI->getDebugLoc() : DiagnosticLocation())); } } |