summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/IR/DiagnosticInfo.h2
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp2
-rw-r--r--llvm/lib/IR/DiagnosticInfo.cpp6
3 files changed, 9 insertions, 1 deletions
diff --git a/llvm/include/llvm/IR/DiagnosticInfo.h b/llvm/include/llvm/IR/DiagnosticInfo.h
index 15d33257711..c0bfe681e05 100644
--- a/llvm/include/llvm/IR/DiagnosticInfo.h
+++ b/llvm/include/llvm/IR/DiagnosticInfo.h
@@ -420,7 +420,9 @@ public:
Argument(StringRef Key, const Value *V);
Argument(StringRef Key, const Type *T);
Argument(StringRef Key, int N);
+ Argument(StringRef Key, int64_t N);
Argument(StringRef Key, unsigned N);
+ Argument(StringRef Key, uint64_t N);
Argument(StringRef Key, bool B) : Key(Key), Val(B ? "true" : "false") {}
};
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index b9a1010e46f..63c839fcb0b 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -963,7 +963,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
MachineOptimizationRemarkAnalysis R(
DEBUG_TYPE, "StackSize", Fn.getFunction()->getSubprogram(), &Fn.front());
- R << ore::NV("NumStackBytes", static_cast<unsigned>(StackSize))
+ R << ore::NV("NumStackBytes", StackSize)
<< " stack bytes in function";
ORE->emit(R);
}
diff --git a/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp
index 5129d6b9b00..6feeb2911e3 100644
--- a/llvm/lib/IR/DiagnosticInfo.cpp
+++ b/llvm/lib/IR/DiagnosticInfo.cpp
@@ -221,9 +221,15 @@ DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, const Type *T)
DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, int N)
: Key(Key), Val(itostr(N)) {}
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, int64_t N)
+ : Key(Key), Val(itostr(N)) {}
+
DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, unsigned N)
: Key(Key), Val(utostr(N)) {}
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, uint64_t N)
+ : Key(Key), Val(utostr(N)) {}
+
void DiagnosticInfoOptimizationBase::print(DiagnosticPrinter &DP) const {
DP << getLocationStr() << ": " << getMsg();
if (Hotness)
OpenPOWER on IntegriCloud