[llvm] r205105 - ARM64: format register strings without creating a local Twine.
Tim Northover
tnorthover at apple.com
Sat Mar 29 08:35:57 PDT 2014
Author: tnorthover
Date: Sat Mar 29 10:35:57 2014
New Revision: 205105
URL: http://llvm.org/viewvc/llvm-project?rev=205105&view=rev
Log:
ARM64: format register strings without creating a local Twine.
It was causing horrible failures on some build-bots.
Modified:
llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
Modified: llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp?rev=205105&r1=205104&r2=205105&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM64/InstPrinter/ARM64InstPrinter.cpp Sat Mar 29 10:35:57 2014
@@ -16,6 +16,7 @@
#include "MCTargetDesc/ARM64AddressingModes.h"
#include "MCTargetDesc/ARM64BaseInfo.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCRegisterInfo.h"
@@ -1329,14 +1330,13 @@ void ARM64InstPrinter::printImplicitlyTy
template <unsigned NumLanes, char LaneKind>
void ARM64InstPrinter::printTypedVectorList(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
- Twine Suffix;
+ std::string Suffix(".");
if (NumLanes)
- Suffix = Twine('.') + Twine(NumLanes) + Twine(LaneKind);
+ Suffix += itostr(NumLanes) + LaneKind;
else
- Suffix = Twine('.') + Twine(LaneKind);
+ Suffix += LaneKind;
- SmallString<8> Buf;
- printVectorList(MI, OpNum, O, Suffix.toStringRef(Buf));
+ printVectorList(MI, OpNum, O, Suffix);
}
void ARM64InstPrinter::printVectorIndex(const MCInst *MI, unsigned OpNum,
More information about the llvm-commits
mailing list