[llvm-commits] [llvm] r51095 - /llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Wed May 14 00:52:05 PDT 2008


Author: geoffray
Date: Wed May 14 02:52:03 2008
New Revision: 51095

URL: http://llvm.org/viewvc/llvm-project?rev=51095&view=rev
Log:
Fix typo in ParameterAttribute fields usage. Add an include
to make the Cpp backend output compilable.


Modified:
    llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp

Modified: llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp?rev=51095&r1=51094&r2=51095&view=diff

==============================================================================
--- llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp (original)
+++ llvm/trunk/lib/Target/CppBackend/CPPBackend.cpp Wed May 14 02:52:03 2008
@@ -431,7 +431,7 @@
 
   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 @@
       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 @@
     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";





More information about the llvm-commits mailing list