summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm-c/lto.h9
-rw-r--r--llvm/include/llvm/IR/DiagnosticInfo.h3
-rw-r--r--llvm/lib/IR/LLVMContext.cpp3
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp3
4 files changed, 14 insertions, 4 deletions
diff --git a/llvm/include/llvm-c/lto.h b/llvm/include/llvm-c/lto.h
index bff63ad0969..87904c208cc 100644
--- a/llvm/include/llvm-c/lto.h
+++ b/llvm/include/llvm-c/lto.h
@@ -40,7 +40,7 @@ typedef bool lto_bool_t;
* @{
*/
-#define LTO_API_VERSION 9
+#define LTO_API_VERSION 10
/**
* \since prior to LTO_API_VERSION=3
@@ -299,9 +299,10 @@ lto_module_get_linkeropt(lto_module_t mod, unsigned int index);
* \since LTO_API_VERSION=7
*/
typedef enum {
- LTO_DS_ERROR,
- LTO_DS_WARNING,
- LTO_DS_NOTE
+ LTO_DS_ERROR = 0,
+ LTO_DS_WARNING = 1,
+ LTO_DS_REMARK = 3, // Added in LTO_API_VERSION=10.
+ LTO_DS_NOTE = 2
} lto_codegen_diagnostic_severity_t;
/**
diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h
index 4c7af89d72f..9b99ce6cd78 100644
--- a/llvm/include/llvm/IR/DiagnosticInfo.h
+++ b/llvm/include/llvm/IR/DiagnosticInfo.h
@@ -31,6 +31,9 @@ class Value;
enum DiagnosticSeverity {
DS_Error,
DS_Warning,
+ DS_Remark,
+ // A note attaches additional information to one of the previous diagnostic
+ // types.
DS_Note
};
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index d9d6de15447..1bfc5152773 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -142,6 +142,9 @@ void LLVMContext::diagnose(const DiagnosticInfo &DI) {
case DS_Warning:
errs() << "warning: " << MsgStorage << "\n";
break;
+ case DS_Remark:
+ errs() << "remark: " << MsgStorage << "\n";
+ break;
case DS_Note:
errs() << "note: " << MsgStorage << "\n";
break;
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index c5f98736c00..777db9c9128 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -562,6 +562,9 @@ void LTOCodeGenerator::DiagnosticHandler2(const DiagnosticInfo &DI) {
case DS_Warning:
Severity = LTO_DS_WARNING;
break;
+ case DS_Remark:
+ Severity = LTO_DS_REMARK;
+ break;
case DS_Note:
Severity = LTO_DS_NOTE;
break;
OpenPOWER on IntegriCloud