Twines: Don't allow implicit conversion from integers, this is too tricky.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77605 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-07-30 17:37:43 +00:00
parent e802f1c4c3
commit fe09b2098a
6 changed files with 68 additions and 17 deletions

View File

@@ -252,22 +252,22 @@ namespace llvm {
}
/// Construct a twine to print \arg Val as an unsigned decimal integer.
Twine(const uint32_t &Val)
explicit Twine(const uint32_t &Val)
: LHS(&Val), LHSKind(UDec32Kind), RHSKind(EmptyKind) {
}
/// Construct a twine to print \arg Val as a signed decimal integer.
Twine(const int32_t &Val)
explicit Twine(const int32_t &Val)
: LHS(&Val), LHSKind(SDec32Kind), RHSKind(EmptyKind) {
}
/// Construct a twine to print \arg Val as an unsigned decimal integer.
Twine(const uint64_t &Val)
explicit Twine(const uint64_t &Val)
: LHS(&Val), LHSKind(UDec64Kind), RHSKind(EmptyKind) {
}
/// Construct a twine to print \arg Val as a signed decimal integer.
Twine(const int64_t &Val)
explicit Twine(const int64_t &Val)
: LHS(&Val), LHSKind(SDec64Kind), RHSKind(EmptyKind) {
}