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()));
}
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[] = {
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;
// 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;
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[] = {
}
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;
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);
}