Support all integer types in DiagnosticInfoOptimizationBase::Argument

We were missing size_t (unsigned long) on macOS.

llvm-svn: 311628
This commit is contained in:
Adam Nemet 2017-08-24 04:04:49 +00:00
parent 9ff294f039
commit 0ada0d5b21
2 changed files with 14 additions and 4 deletions

View 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);
};

View 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)