From e22e6131281180936c5196e811e4c952549aa7ab Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 3 Jan 2012 23:47:05 +0000 Subject: generalize LLVMContext::emitError to take a twine instead of a StringRef. llvm-svn: 147501 --- llvm/lib/VMCore/LLVMContext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/VMCore/LLVMContext.cpp') diff --git a/llvm/lib/VMCore/LLVMContext.cpp b/llvm/lib/VMCore/LLVMContext.cpp index e1a9b177243..d77e996b5e4 100644 --- a/llvm/lib/VMCore/LLVMContext.cpp +++ b/llvm/lib/VMCore/LLVMContext.cpp @@ -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"; -- cgit v1.2.3