[OptRemark] Allow streaming of 64-bit integers
authorAdam Nemet <anemet@apple.com>
Thu, 27 Jul 2017 16:54:13 +0000 (16:54 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 27 Jul 2017 16:54:13 +0000 (16:54 +0000)
llvm-svn: 309293

llvm/include/llvm/IR/DiagnosticInfo.h
llvm/lib/CodeGen/PrologEpilogInserter.cpp
llvm/lib/IR/DiagnosticInfo.cpp

index 15d3325..c0bfe68 100644 (file)
@@ -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") {}
   };
 
index b9a1010..63c839f 100644 (file)
@@ -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);
 }
index 5129d6b..6feeb29 100644 (file)
@@ -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)