]> granicus.if.org Git - llvm/commitdiff
[AMDGPU] Fix few coding style issues. NFC.
authorValery Pykhtin <Valery.Pykhtin@amd.com>
Wed, 15 Jun 2016 13:55:09 +0000 (13:55 +0000)
committerValery Pykhtin <Valery.Pykhtin@amd.com>
Wed, 15 Jun 2016 13:55:09 +0000 (13:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272785 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp
lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h

index 99f56bb2a470c26c2fff44d3a164512c53d18489..e228092b867ed3c853983c3483abbe6a4b4416ca 100644 (file)
@@ -30,7 +30,7 @@ static ArrayRef<StringRef> get_amd_kernel_code_t_FldNames() {
   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, const amd_kernel_code_t &c,
 }
 
 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_tC,
+void llvm::printAmdKernelCodeField(const amd_kernel_code_t &C,
                                    int FldIndex,
-                                   raw_ostreamOS) {
+                                   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_tC,
-                             raw_ostreamOS,
-                             const chartab) {
+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_kernel_code_t* C,
 
 // 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_code_t &C, MCAsmLexer &Lexer,
   return true;
 }
 
-typedef bool(*ParseFx)(amd_kernel_code_t&,
-                       MCAsmLexerLexer,
-                       raw_ostreamErr);
+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,
-                                   MCAsmLexerLexer,
-                                   amd_kernel_code_tC,
-                                   raw_ostreamErr) {
+                                   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;
index 6e2445323e1ea0200ec6574efebefa7c62a05d42..61c1a0fc6c081cec18bf4c3edb756b53ae70cd0a 100644 (file)
@@ -20,18 +20,18 @@ class MCAsmLexer;
 class raw_ostream;
 class StringRef;
 
-void printAmdKernelCodeField(const amd_kernel_code_tC,
+void printAmdKernelCodeField(const amd_kernel_code_t &C,
   int FldIndex,
-  raw_ostreamOS);
+  raw_ostream &OS);
 
-void dumpAmdKernelCode(const amd_kernel_code_tC,
-  raw_ostreamOS,
-  const chartab);
+void dumpAmdKernelCode(const amd_kernel_code_t *C,
+  raw_ostream &OS,
+  const char *tab);
 
 bool parseAmdKernelCodeField(StringRef ID,
-  MCAsmLexerLexer,
-  amd_kernel_code_tC,
-  raw_ostreamErr);
+  MCAsmLexer &Lexer,
+  amd_kernel_code_t &C,
+  raw_ostream &Err);
 
 }