[Polly] Replace use of std::stringstream. NFC.

Use of std::-style (io)streams is discouraged in the LLVM coding style
(https://llvm.org/docs/CodingStandards.html#include-iostream-is-forbidden).
Replace with a use of llvm::Twine (which uses llvm::raw_ostream behind
the scenes).
This commit is contained in:
Michael Kruse 2020-03-09 11:15:14 -05:00
parent d1186fcb04
commit 0e93f3b0a0
1 changed files with 4 additions and 5 deletions

View File

@ -12,8 +12,8 @@
#include "polly/CodeGen/RuntimeDebugBuilder.h"
#include "polly/ScopInfo.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/IR/IntrinsicsX86.h"
#include <sstream>
using namespace llvm;
using namespace polly;
@ -82,13 +82,12 @@ static void TryRegisterGlobal(Module *M, const char *Name,
// Generate a unique name that is usable as a LLVM name for a scop to name its
// performance counter.
static std::string GetScopUniqueVarname(const Scop &S) {
std::stringstream Name;
std::string EntryString, ExitString;
std::tie(EntryString, ExitString) = S.getEntryExitStr();
Name << "__polly_perf_in_" << std::string(S.getFunction().getName())
<< "_from__" << EntryString << "__to__" << ExitString;
return Name.str();
return (Twine("__polly_perf_in_") + S.getFunction().getName() + "_from__" +
EntryString + "__to__" + ExitString)
.str();
}
void PerfMonitor::addScopCounter() {