]> granicus.if.org Git - llvm/commitdiff
[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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309293 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 15d3325771136f969a31ba84584d9e45101d6196..c0bfe681e054d7d9c620a3882d32b859590532e2 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 b9a1010e46f9724181f89bb1e85181d4d0c02ca5..63c839fcb0bf7e3faad2b88da5b89a3eff302de5 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 5129d6b9b008e3d162cdc9a881200437d1e9fd59..6feeb2911e3f7e0ab5615deafda262b7c2810932 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)