diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2024-12-12 09:01:48 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-11 16:01:48 -0800 |
commit | ea632e1b34e1878b977f8adc406a89e91aa98b7e (patch) | |
tree | a6e50bd5fe024ea74d97be89c9180f5e4afa0a94 /llvm/lib/IR/LLVMContext.cpp | |
parent | dd647e3e608ed0b2bac7c588d5859b80ef4a5976 (diff) | |
download | llvm-ea632e1b34e1878b977f8adc406a89e91aa98b7e.zip llvm-ea632e1b34e1878b977f8adc406a89e91aa98b7e.tar.gz llvm-ea632e1b34e1878b977f8adc406a89e91aa98b7e.tar.bz2 |
Reapply "DiagnosticInfo: Clean up usage of DiagnosticInfoInlineAsm" (#119575) (#119634)
This reverts commit 40986feda8b1437ed475b144d5b9a208b008782a.
Reapply with fix to prevent temporary Twine from going out of scope.
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index e078527..eb51a75 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -219,12 +219,12 @@ void LLVMContext::yield() { } void LLVMContext::emitError(const Twine &ErrorStr) { - diagnose(DiagnosticInfoInlineAsm(ErrorStr)); + diagnose(DiagnosticInfoGeneric(ErrorStr)); } void LLVMContext::emitError(const Instruction *I, const Twine &ErrorStr) { - assert (I && "Invalid instruction"); - diagnose(DiagnosticInfoInlineAsm(*I, ErrorStr)); + assert(I && "Invalid instruction"); + diagnose(DiagnosticInfoGeneric(I, ErrorStr)); } static bool isDiagnosticEnabled(const DiagnosticInfo &DI) { @@ -283,10 +283,6 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) { exit(1); } -void LLVMContext::emitError(uint64_t LocCookie, const Twine &ErrorStr) { - diagnose(DiagnosticInfoInlineAsm(LocCookie, ErrorStr)); -} - //===----------------------------------------------------------------------===// // Metadata Kind Uniquing //===----------------------------------------------------------------------===// |