summaryrefslogtreecommitdiff
path: root/utils/TableGen
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-02-20 11:08:44 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-02-20 11:08:44 +0000
commitae9f3a3b7c915f725aef5a7250e88eaeddda03c6 (patch)
treeb32dad9e6075f8f292819f06d26e306fc94427a0 /utils/TableGen
parent6d794746b7ae1ed531f08c04dd29d79c13b35075 (diff)
downloadllvm-ae9f3a3b7c915f725aef5a7250e88eaeddda03c6.tar.gz
llvm-ae9f3a3b7c915f725aef5a7250e88eaeddda03c6.tar.bz2
llvm-ae9f3a3b7c915f725aef5a7250e88eaeddda03c6.tar.xz
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp3
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.cpp4
-rw-r--r--utils/TableGen/CodeGenRegisters.h3
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp3
-rw-r--r--utils/TableGen/TGLexer.cpp2
5 files changed, 10 insertions, 5 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index 07ef2e5c8d..5a24b26422 100644
--- a/utils/TableGen/AsmWriterEmitter.cpp
+++ b/utils/TableGen/AsmWriterEmitter.cpp
@@ -242,11 +242,12 @@ unsigned AsmWriterInst::MatchesAllButOneOp(const AsmWriterInst &Other)const{
unsigned MismatchOperand = ~0U;
for (unsigned i = 0, e = Operands.size(); i != e; ++i) {
- if (Operands[i] != Other.Operands[i])
+ if (Operands[i] != Other.Operands[i]) {
if (MismatchOperand != ~0U) // Already have one mismatch?
return ~1U;
else
MismatchOperand = i;
+ }
}
return MismatchOperand;
}
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp
index ddfaaac578..0faaa7284a 100644
--- a/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/utils/TableGen/CodeGenDAGPatterns.cpp
@@ -1342,14 +1342,14 @@ void CodeGenDAGPatterns::ParseDefaultOperands() {
while (TPN->ApplyTypeConstraints(P, false))
/* Resolve all types */;
- if (TPN->ContainsUnresolvedType())
+ if (TPN->ContainsUnresolvedType()) {
if (iter == 0)
throw "Value #" + utostr(i) + " of PredicateOperand '" +
DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!";
else
throw "Value #" + utostr(i) + " of OptionalDefOperand '" +
DefaultOps[iter][i]->getName() + "' doesn't have a concrete type!";
-
+ }
DefaultOpInfo.DefaultOps.push_back(TPN);
}
diff --git a/utils/TableGen/CodeGenRegisters.h b/utils/TableGen/CodeGenRegisters.h
index 4efae7842b..0f1b501fc1 100644
--- a/utils/TableGen/CodeGenRegisters.h
+++ b/utils/TableGen/CodeGenRegisters.h
@@ -15,9 +15,10 @@
#ifndef CODEGEN_REGISTERS_H
#define CODEGEN_REGISTERS_H
+#include "llvm/CodeGen/ValueTypes.h"
#include <string>
#include <vector>
-#include "llvm/CodeGen/ValueTypes.h"
+#include <cstdlib>
namespace llvm {
class Record;
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index bdf6b64205..6f562fad59 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -1123,7 +1123,7 @@ public:
Code += "), 0";
emitCode(Code2 + Code + ");");
- if (NodeHasChain)
+ if (NodeHasChain) {
// Remember which op produces the chain.
if (!isRoot)
emitCode(ChainName + " = SDOperand(" + NodeName +
@@ -1131,6 +1131,7 @@ public:
else
emitCode(ChainName + " = SDOperand(" + NodeName +
", " + utostr(NumResults+NumDstRegs) + ");");
+ }
if (!isRoot) {
NodeOps.push_back("Tmp" + utostr(ResNo));
diff --git a/utils/TableGen/TGLexer.cpp b/utils/TableGen/TGLexer.cpp
index 9fa696e8cb..2af35b05d6 100644
--- a/utils/TableGen/TGLexer.cpp
+++ b/utils/TableGen/TGLexer.cpp
@@ -17,6 +17,8 @@
#include <ostream>
#include "llvm/Config/config.h"
#include <cctype>
+#include <cstdlib>
+#include <cstring>
using namespace llvm;
TGLexer::TGLexer(MemoryBuffer *StartBuf) : CurLineNo(1), CurBuf(StartBuf) {