forked from OSchip/llvm-project
[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:
parent
d1186fcb04
commit
0e93f3b0a0
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue