aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/LLVMContext.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-01-03 23:47:05 +0000
committerChris Lattner <sabre@nondot.org>2012-01-03 23:47:05 +0000
commit3a4c60ca3b8ab835a71a92c02d288b9582e4a643 (patch)
tree39b4361847822a60d4ceaf7199fbfa7827e4327b /lib/VMCore/LLVMContext.cpp
parentb90d2a9046954706f98b8d338b465389834a3bf1 (diff)
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
Diffstat (limited to 'lib/VMCore/LLVMContext.cpp')
-rw-r--r--lib/VMCore/LLVMContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp
index e1a9b17724..d77e996b5e 100644
--- a/lib/VMCore/LLVMContext.cpp
+++ b/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";