llvm.org GIT mirror llvm / 2ab3f3b
[AMDGPU] Fix few coding style issues. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272785 91177308-0d34-0410-b5e6-96231b3b80d8 Valery Pykhtin 3 years ago
2 changed file(s) with 23 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
2929 return makeArrayRef(Table);
3030 }
3131
32 static StringMap createIndexMap(const ArrayRef& a) {
32 static StringMap createIndexMap(const ArrayRef &a) {
3333 StringMap map;
3434 for (auto Name : a)
3535 map.insert(std::make_pair(Name, map.size()));
6666 }
6767
6868 typedef void(*PrintFx)(StringRef,
69 const amd_kernel_code_t&,
70 raw_ostream&);
69 const amd_kernel_code_t &,
70 raw_ostream &);
7171
7272 static ArrayRef getPrinterTable() {
7373 static const PrintFx Table[] = {
7878 return makeArrayRef(Table);
7979 }
8080
81 void llvm::printAmdKernelCodeField(const amd_kernel_code_t& C,
81 void llvm::printAmdKernelCodeField(const amd_kernel_code_t &C,
8282 int FldIndex,
83 raw_ostream& OS) {
83 raw_ostream &OS) {
8484 auto Printer = getPrinterTable()[FldIndex];
8585 if (Printer)
8686 Printer(get_amd_kernel_code_t_FieldName(FldIndex), C, OS);
8787 }
8888
89 void llvm::dumpAmdKernelCode(const amd_kernel_code_t* C,
90 raw_ostream& OS,
91 const char* tab) {
89 void llvm::dumpAmdKernelCode(const amd_kernel_code_t *C,
90 raw_ostream &OS,
91 const char *tab) {
9292 const int Size = getPrinterTable().size();
9393 for (int i = 0; i < Size; ++i) {
9494 OS << tab;
100100
101101 // Field parsing
102102
103 static bool expectEqualInt(MCAsmLexer& Lexer, raw_ostream& Err) {
103 static bool expectEqualInt(MCAsmLexer &Lexer, raw_ostream &Err) {
104104 if (Lexer.isNot(AsmToken::Equal)) {
105105 Err << "expected '='";
106106 return false;
133133 return true;
134134 }
135135
136 typedef bool(*ParseFx)(amd_kernel_code_t&,
137 MCAsmLexer& Lexer,
138 raw_ostream& Err);
136 typedef bool(*ParseFx)(amd_kernel_code_t &,
137 MCAsmLexer &Lexer,
138 raw_ostream &Err);
139139
140140 static ArrayRef getParserTable() {
141141 static const ParseFx Table[] = {
147147 }
148148
149149 bool llvm::parseAmdKernelCodeField(StringRef ID,
150 MCAsmLexer& Lexer,
151 amd_kernel_code_t& C,
152 raw_ostream& Err) {
150 MCAsmLexer &Lexer,
151 amd_kernel_code_t &C,
152 raw_ostream &Err) {
153153 const int Idx = get_amd_kernel_code_t_FieldIndex(ID);
154154 if (Idx < 0) {
155155 Err << "unexpected amd_kernel_code_t field name " << ID;
1919 class raw_ostream;
2020 class StringRef;
2121
22 void printAmdKernelCodeField(const amd_kernel_code_t& C,
22 void printAmdKernelCodeField(const amd_kernel_code_t &C,
2323 int FldIndex,
24 raw_ostream& OS);
24 raw_ostream &OS);
2525
26 void dumpAmdKernelCode(const amd_kernel_code_t* C,
27 raw_ostream& OS,
28 const char* tab);
26 void dumpAmdKernelCode(const amd_kernel_code_t *C,
27 raw_ostream &OS,
28 const char *tab);
2929
3030 bool parseAmdKernelCodeField(StringRef ID,
31 MCAsmLexer& Lexer,
32 amd_kernel_code_t& C,
33 raw_ostream& Err);
31 MCAsmLexer &Lexer,
32 amd_kernel_code_t &C,
33 raw_ostream &Err);
3434
3535 }
3636