[llvm] r272785 - [AMDGPU] Fix few coding style issues. NFC.
Valery Pykhtin via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 06:55:09 PDT 2016
Author: vpykhtin
Date: Wed Jun 15 08:55:09 2016
New Revision: 272785
URL: http://llvm.org/viewvc/llvm-project?rev=272785&view=rev
Log:
[AMDGPU] Fix few coding style issues. NFC.
Modified:
llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp
llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h
Modified: llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp?rev=272785&r1=272784&r2=272785&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp Wed Jun 15 08:55:09 2016
@@ -30,7 +30,7 @@ static ArrayRef<StringRef> get_amd_kerne
return makeArrayRef(Table);
}
-static StringMap<int> createIndexMap(const ArrayRef<StringRef>& a) {
+static StringMap<int> createIndexMap(const ArrayRef<StringRef> &a) {
StringMap<int> map;
for (auto Name : a)
map.insert(std::make_pair(Name, map.size()));
@@ -67,8 +67,8 @@ static void printBitField(StringRef Name
}
typedef void(*PrintFx)(StringRef,
- const amd_kernel_code_t&,
- raw_ostream&);
+ const amd_kernel_code_t &,
+ raw_ostream &);
static ArrayRef<PrintFx> getPrinterTable() {
static const PrintFx Table[] = {
@@ -79,17 +79,17 @@ static ArrayRef<PrintFx> getPrinterTable
return makeArrayRef(Table);
}
-void llvm::printAmdKernelCodeField(const amd_kernel_code_t& C,
+void llvm::printAmdKernelCodeField(const amd_kernel_code_t &C,
int FldIndex,
- raw_ostream& OS) {
+ raw_ostream &OS) {
auto Printer = getPrinterTable()[FldIndex];
if (Printer)
Printer(get_amd_kernel_code_t_FieldName(FldIndex), C, OS);
}
-void llvm::dumpAmdKernelCode(const amd_kernel_code_t* C,
- raw_ostream& OS,
- const char* tab) {
+void llvm::dumpAmdKernelCode(const amd_kernel_code_t *C,
+ raw_ostream &OS,
+ const char *tab) {
const int Size = getPrinterTable().size();
for (int i = 0; i < Size; ++i) {
OS << tab;
@@ -101,7 +101,7 @@ void llvm::dumpAmdKernelCode(const amd_k
// Field parsing
-static bool expectEqualInt(MCAsmLexer& Lexer, raw_ostream& Err) {
+static bool expectEqualInt(MCAsmLexer &Lexer, raw_ostream &Err) {
if (Lexer.isNot(AsmToken::Equal)) {
Err << "expected '='";
return false;
@@ -134,9 +134,9 @@ static bool parseBitField(amd_kernel_cod
return true;
}
-typedef bool(*ParseFx)(amd_kernel_code_t&,
- MCAsmLexer& Lexer,
- raw_ostream& Err);
+typedef bool(*ParseFx)(amd_kernel_code_t &,
+ MCAsmLexer &Lexer,
+ raw_ostream &Err);
static ArrayRef<ParseFx> getParserTable() {
static const ParseFx Table[] = {
@@ -148,9 +148,9 @@ static ArrayRef<ParseFx> getParserTable(
}
bool llvm::parseAmdKernelCodeField(StringRef ID,
- MCAsmLexer& Lexer,
- amd_kernel_code_t& C,
- raw_ostream& Err) {
+ MCAsmLexer &Lexer,
+ amd_kernel_code_t &C,
+ raw_ostream &Err) {
const int Idx = get_amd_kernel_code_t_FieldIndex(ID);
if (Idx < 0) {
Err << "unexpected amd_kernel_code_t field name " << ID;
Modified: llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h?rev=272785&r1=272784&r2=272785&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h (original)
+++ llvm/trunk/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h Wed Jun 15 08:55:09 2016
@@ -20,18 +20,18 @@ class MCAsmLexer;
class raw_ostream;
class StringRef;
-void printAmdKernelCodeField(const amd_kernel_code_t& C,
+void printAmdKernelCodeField(const amd_kernel_code_t &C,
int FldIndex,
- raw_ostream& OS);
+ raw_ostream &OS);
-void dumpAmdKernelCode(const amd_kernel_code_t* C,
- raw_ostream& OS,
- const char* tab);
+void dumpAmdKernelCode(const amd_kernel_code_t *C,
+ raw_ostream &OS,
+ const char *tab);
bool parseAmdKernelCodeField(StringRef ID,
- MCAsmLexer& Lexer,
- amd_kernel_code_t& C,
- raw_ostream& Err);
+ MCAsmLexer &Lexer,
+ amd_kernel_code_t &C,
+ raw_ostream &Err);
}
More information about the llvm-commits
mailing list