aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/LLVMContext.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-12-11 07:51:36 -0800
committerGitHub <noreply@github.com>2024-12-11 07:51:36 -0800
commit40986feda8b1437ed475b144d5b9a208b008782a (patch)
treefb9cf5f5da966ed1caf5c01f3e86e2144a77b100 /llvm/lib/IR/LLVMContext.cpp
parent323bedd0d60a9f4c04015687326eba1e96f34b04 (diff)
downloadllvm-40986feda8b1437ed475b144d5b9a208b008782a.zip
llvm-40986feda8b1437ed475b144d5b9a208b008782a.tar.gz
llvm-40986feda8b1437ed475b144d5b9a208b008782a.tar.bz2
Revert "DiagnosticInfo: Clean up usage of DiagnosticInfoInlineAsm" (#119575)
Reverts llvm/llvm-project#119485 Breaks builders, details in llvm/llvm-project#119485
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r--llvm/lib/IR/LLVMContext.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index eb51a75..e078527 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(DiagnosticInfoGeneric(ErrorStr));
+ diagnose(DiagnosticInfoInlineAsm(ErrorStr));
}
void LLVMContext::emitError(const Instruction *I, const Twine &ErrorStr) {
- assert(I && "Invalid instruction");
- diagnose(DiagnosticInfoGeneric(I, ErrorStr));
+ assert (I && "Invalid instruction");
+ diagnose(DiagnosticInfoInlineAsm(*I, ErrorStr));
}
static bool isDiagnosticEnabled(const DiagnosticInfo &DI) {
@@ -283,6 +283,10 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) {
exit(1);
}
+void LLVMContext::emitError(uint64_t LocCookie, const Twine &ErrorStr) {
+ diagnose(DiagnosticInfoInlineAsm(LocCookie, ErrorStr));
+}
+
//===----------------------------------------------------------------------===//
// Metadata Kind Uniquing
//===----------------------------------------------------------------------===//