]> granicus.if.org Git - llvm/commitdiff
Support all integer types in DiagnosticInfoOptimizationBase::Argument
authorAdam Nemet <anemet@apple.com>
Thu, 24 Aug 2017 04:04:49 +0000 (04:04 +0000)
committerAdam Nemet <anemet@apple.com>
Thu, 24 Aug 2017 04:04:49 +0000 (04:04 +0000)
We were missing size_t (unsigned long) on macOS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311628 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 69a73fa1985b38f43e91ccbb163e772352f7ecd2..b2fa898d353559a8cea649a0ddfd7bf464b5fbeb 100644 (file)
@@ -421,9 +421,11 @@ public:
     Argument(StringRef Key, const Type *T);
     Argument(StringRef Key, StringRef S);
     Argument(StringRef Key, int N);
-    Argument(StringRef Key, int64_t N);
+    Argument(StringRef Key, long N);
+    Argument(StringRef Key, long long N);
     Argument(StringRef Key, unsigned N);
-    Argument(StringRef Key, uint64_t N);
+    Argument(StringRef Key, unsigned long N);
+    Argument(StringRef Key, unsigned long long N);
     Argument(StringRef Key, bool B) : Key(Key), Val(B ? "true" : "false") {}
     Argument(StringRef Key, DebugLoc dl);
   };
index 4ae5ddc64e6f0e8371e8a016398a37d49ecbc01a..3f1a2879b33f88cc430d6c28c0b58c5428ed3ca7 100644 (file)
@@ -221,13 +221,21 @@ DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, StringRef S)
 DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, int N)
     : Key(Key), Val(itostr(N)) {}
 
-DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, int64_t N)
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, long N)
+    : Key(Key), Val(itostr(N)) {}
+
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, long long 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)
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key,
+                                                   unsigned long N)
+    : Key(Key), Val(utostr(N)) {}
+
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key,
+                                                   unsigned long long N)
     : Key(Key), Val(utostr(N)) {}
 
 DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, DebugLoc Loc)