7b244965b6
+ Fix typo with missing comma in counterNames array
+ Change std::string argument to const std::string& argument in all functions
[ROCm/clr commit: 48abb4a36b]
16 rivejä
340 B
C++
16 rivejä
340 B
C++
#include "StringUtils.h"
|
|
|
|
llvm::StringRef unquoteStr(llvm::StringRef s) {
|
|
if (s.size() > 1 && s.front() == '"' && s.back() == '"') {
|
|
return s.substr(1, s.size() - 2);
|
|
}
|
|
return s;
|
|
}
|
|
|
|
void removePrefixIfPresent(std::string &s, const std::string& prefix) {
|
|
if (s.find(prefix) != 0) {
|
|
return;
|
|
}
|
|
s.erase(0, prefix.size());
|
|
}
|