mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
generalize LLVMContext::emitError to take a twine instead of a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147501 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -83,11 +83,11 @@ void *LLVMContext::getInlineAsmDiagnosticContext() const {
|
||||
return pImpl->InlineAsmDiagContext;
|
||||
}
|
||||
|
||||
void LLVMContext::emitError(StringRef ErrorStr) {
|
||||
void LLVMContext::emitError(const Twine &ErrorStr) {
|
||||
emitError(0U, ErrorStr);
|
||||
}
|
||||
|
||||
void LLVMContext::emitError(const Instruction *I, StringRef ErrorStr) {
|
||||
void LLVMContext::emitError(const Instruction *I, const Twine &ErrorStr) {
|
||||
unsigned LocCookie = 0;
|
||||
if (const MDNode *SrcLoc = I->getMetadata("srcloc")) {
|
||||
if (SrcLoc->getNumOperands() != 0)
|
||||
@@ -97,7 +97,7 @@ void LLVMContext::emitError(const Instruction *I, StringRef ErrorStr) {
|
||||
return emitError(LocCookie, ErrorStr);
|
||||
}
|
||||
|
||||
void LLVMContext::emitError(unsigned LocCookie, StringRef ErrorStr) {
|
||||
void LLVMContext::emitError(unsigned LocCookie, const Twine &ErrorStr) {
|
||||
// If there is no error handler installed, just print the error and exit.
|
||||
if (pImpl->InlineAsmDiagHandler == 0) {
|
||||
errs() << "error: " << ErrorStr << "\n";
|
||||
|
Reference in New Issue
Block a user