summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/AsmMatcherEmitter.cpp
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-02-02 18:20:45 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-02-02 18:20:45 +0000
commitecefe5a81fd01922185afdd4f47e8ff231e34a81 (patch)
treeccec2ae513d2b045e7269505776ed1e6300a0f89 /llvm/utils/TableGen/AsmMatcherEmitter.cpp
parent7a2a5ce0589f8ac9b5c6ca8e7bf202061f7565aa (diff)
downloadbcm5719-llvm-ecefe5a81fd01922185afdd4f47e8ff231e34a81.tar.gz
bcm5719-llvm-ecefe5a81fd01922185afdd4f47e8ff231e34a81.zip
Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793 llvm-svn: 259539
Diffstat (limited to 'llvm/utils/TableGen/AsmMatcherEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index e8dca8b7b02..907eab677b5 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -116,6 +116,7 @@
#include <set>
#include <sstream>
#include <forward_list>
+
using namespace llvm;
#define DEBUG_TYPE "asm-matcher-emitter"
@@ -682,7 +683,6 @@ struct OperandMatchEntry {
}
};
-
class AsmMatcherInfo {
public:
/// Tracked Records
@@ -767,7 +767,7 @@ public:
}
};
-} // End anonymous namespace
+} // end anonymous namespace
void MatchableInfo::dump() const {
errs() << TheDef->getName() << " -- " << "flattened:\"" << AsmString <<"\"\n";
@@ -878,7 +878,6 @@ extractSingletonRegisterForAsmOperand(MatchableInfo::AsmOperand &Op,
// If there is no register prefix (i.e. "%" in "%eax"), then this may
// be some random non-register token, just ignore it.
- return;
}
void MatchableInfo::initialize(const AsmMatcherInfo &Info,
@@ -1156,7 +1155,6 @@ AsmMatcherInfo::getOperandClass(Record *Rec, int SubOpIdx) {
PrintFatalError(Rec->getLoc(), "register class has no class info!");
}
-
if (Rec->isSubClassOf("RegisterClass")) {
if (ClassInfo *CI = RegisterClassClasses[Rec])
return CI;
@@ -1593,7 +1591,7 @@ void AsmMatcherInfo::buildInfo() {
assert(I == J || !J->isSubsetOf(*I));
}
}
-#endif
+#endif // NDEBUG
}
/// buildInstructionOperandReference - The specified operand is a reference to a
@@ -1799,7 +1797,6 @@ static unsigned getConverterOperandID(const std::string &Name,
return ID;
}
-
static void emitConvertFuncs(CodeGenTarget &Target, StringRef ClassName,
std::vector<std::unique_ptr<MatchableInfo>> &Infos,
bool HasMnemonicFirst, raw_ostream &OS) {
@@ -2070,7 +2067,6 @@ static void emitConvertFuncs(CodeGenTarget &Target, StringRef ClassName,
OS << " CVT_NUM_SIGNATURES\n";
OS << "};\n\n";
-
OS << "} // end anonymous namespace\n\n";
// Output the conversion table.
@@ -2728,7 +2724,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
assert(!(**J < **I));
}
}
-#endif
+#endif // NDEBUG
DEBUG_WITH_TYPE("instruction_info", {
for (const auto &MI : Info.Matchables)
@@ -2809,7 +2805,6 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
emitOperandDiagnosticTypes(Info, OS);
OS << "#endif // GET_OPERAND_DIAGNOSTIC_TYPES\n\n";
-
OS << "\n#ifdef GET_REGISTER_MATCHER\n";
OS << "#undef GET_REGISTER_MATCHER\n\n";
@@ -2857,7 +2852,6 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
// Emit the available features compute function.
emitComputeAvailableFeatures(Info, OS);
-
StringToOffsetTable StringTable;
size_t MaxNumOperands = 0;
@@ -3183,4 +3177,4 @@ void EmitAsmMatcher(RecordKeeper &RK, raw_ostream &OS) {
AsmMatcherEmitter(RK).run(OS);
}
-} // End llvm namespace
+} // end namespace llvm
OpenPOWER on IntegriCloud