aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APFloat.cpp5
-rw-r--r--llvm/lib/Support/LSP/Protocol.cpp4
2 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/Support/APFloat.cpp b/llvm/lib/Support/APFloat.cpp
index 4787604..e21cf8e 100644
--- a/llvm/lib/Support/APFloat.cpp
+++ b/llvm/lib/Support/APFloat.cpp
@@ -5354,7 +5354,7 @@ APInt DoubleAPFloat::bitcastToAPInt() const {
Floats[0].bitcastToAPInt().getRawData()[0],
Floats[1].bitcastToAPInt().getRawData()[0],
};
- return APInt(128, 2, Data);
+ return APInt(128, Data);
}
Expected<APFloat::opStatus> DoubleAPFloat::convertFromString(StringRef S,
@@ -5643,8 +5643,7 @@ APFloat::opStatus DoubleAPFloat::convertFromUnsignedParts(
// Create a minimally-sized APInt to represent the source value.
const unsigned SrcBitWidth = SrcMSB + 1;
- APSInt SrcInt{APInt{/*numBits=*/SrcBitWidth,
- /*numWords=*/SrcCount, Src},
+ APSInt SrcInt{APInt{/*numBits=*/SrcBitWidth, ArrayRef(Src, SrcCount)},
/*isUnsigned=*/true};
// Stage 1: Initial Approximation.
diff --git a/llvm/lib/Support/LSP/Protocol.cpp b/llvm/lib/Support/LSP/Protocol.cpp
index f221263..f8eeb32 100644
--- a/llvm/lib/Support/LSP/Protocol.cpp
+++ b/llvm/lib/Support/LSP/Protocol.cpp
@@ -96,10 +96,6 @@ static void percentEncode(StringRef Content, std::string &Out) {
static std::string percentDecode(StringRef Content) {
std::string Result;
for (auto I = Content.begin(), E = Content.end(); I != E; ++I) {
- if (*I != '%') {
- Result += *I;
- continue;
- }
if (*I == '%' && I + 2 < Content.end() && llvm::isHexDigit(*(I + 1)) &&
llvm::isHexDigit(*(I + 2))) {
Result.push_back(llvm::hexFromNibbles(*(I + 1), *(I + 2)));