summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CppBackend/CPPBackend.cpp
diff options
context:
space:
mode:
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-05-14 07:52:03 +0000
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-05-14 07:52:03 +0000
commitfbdca964699ac46ab82ade7247b61adcd5587d06 (patch)
treecaef8fed929b906d560242a8d025cb6b09a1e572 /llvm/lib/Target/CppBackend/CPPBackend.cpp
parent1f8c9ef4cc256eae7531351f2f321a5a1801edeb (diff)
downloadbcm5719-llvm-fbdca964699ac46ab82ade7247b61adcd5587d06.tar.gz
bcm5719-llvm-fbdca964699ac46ab82ade7247b61adcd5587d06.zip
Fix typo in ParameterAttribute fields usage. Add an include
to make the Cpp backend output compilable. llvm-svn: 51095
Diffstat (limited to 'llvm/lib/Target/CppBackend/CPPBackend.cpp')
-rw-r--r--llvm/lib/Target/CppBackend/CPPBackend.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Target/CppBackend/CPPBackend.cpp b/llvm/lib/Target/CppBackend/CPPBackend.cpp
index 2ba5fa66808..87240731b57 100644
--- a/llvm/lib/Target/CppBackend/CPPBackend.cpp
+++ b/llvm/lib/Target/CppBackend/CPPBackend.cpp
@@ -431,7 +431,7 @@ namespace {
void CppWriter::printParamAttrs(const PAListPtr &PAL,
const std::string &name) {
- Out << "PAListPtr " << name << "_PAL = 0;";
+ Out << "PAListPtr " << name << "_PAL;";
nl(Out);
if (!PAL.isEmpty()) {
Out << '{'; in(); nl(Out);
@@ -440,7 +440,7 @@ namespace {
for (unsigned i = 0; i < PAL.getNumSlots(); ++i) {
uint16_t index = PAL.getSlot(i).Index;
ParameterAttributes attrs = PAL.getSlot(i).Attrs;
- Out << "PAWI.index = " << index << "; PAWI.attrs = 0 ";
+ Out << "PAWI.Index = " << index << "; PAWI.Attrs = 0 ";
if (attrs & ParamAttr::SExt)
Out << " | ParamAttr::SExt";
if (attrs & ParamAttr::ZExt)
@@ -1745,6 +1745,7 @@ namespace {
Out << "#include <llvm/Support/MathExtras.h>\n";
Out << "#include <llvm/Pass.h>\n";
Out << "#include <llvm/PassManager.h>\n";
+ Out << "#include <llvm/ADT/SmallVector.h>\n";
Out << "#include <llvm/Analysis/Verifier.h>\n";
Out << "#include <llvm/Assembly/PrintModulePass.h>\n";
Out << "#include <algorithm>\n";
OpenPOWER on IntegriCloud