[cfe-commits] r63794 - in /cfe/trunk/lib/CodeGen: ABIInfo.h CGCall.cpp

Daniel Dunbar daniel at zuster.org
Wed Feb 4 15:24:38 PST 2009


Author: ddunbar
Date: Wed Feb  4 17:24:38 2009
New Revision: 63794

URL: http://llvm.org/viewvc/llvm-project?rev=63794&view=rev
Log:
Add ABIArgInfo::dump()

Modified:
    cfe/trunk/lib/CodeGen/ABIInfo.h
    cfe/trunk/lib/CodeGen/CGCall.cpp

Modified: cfe/trunk/lib/CodeGen/ABIInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ABIInfo.h?rev=63794&r1=63793&r2=63794&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/ABIInfo.h (original)
+++ cfe/trunk/lib/CodeGen/ABIInfo.h Wed Feb  4 17:24:38 2009
@@ -113,6 +113,8 @@
       assert(TheKind == ByVal && "Invalid kind!");
       return UIntData;
     }
+
+    void dump() const;
   };
 
   /// ABIInfo - Target specific hooks for defining how a type should be

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=63794&r1=63793&r2=63794&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Wed Feb  4 17:24:38 2009
@@ -23,6 +23,7 @@
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Attributes.h"
 #include "llvm/Support/CommandLine.h"
+#include "llvm/Support/raw_ostream.h"
 #include "llvm/Target/TargetData.h"
 
 #include "ABIInfo.h"
@@ -114,6 +115,36 @@
 
 ABIInfo::~ABIInfo() {}
 
+void ABIArgInfo::dump() const {
+  fprintf(stderr, "(ABIArgInfo Kind=");
+  switch (TheKind) {
+  case Direct: 
+    fprintf(stderr, "Direct");
+    break;
+  case StructRet: 
+    fprintf(stderr, "StructRet");
+    break;
+  case Ignore: 
+    fprintf(stderr, "Ignore");
+    break;
+  case Coerce: 
+    fprintf(stderr, "Coerce Type=");
+    getCoerceToType()->print(llvm::errs());
+    // FIXME: This is ridiculous.
+    llvm::errs().flush();
+    break;
+  case ByVal: 
+    fprintf(stderr, "ByVal Align=%d", getByValAlignment());
+    break;
+  case Expand: 
+    fprintf(stderr, "Expand");
+    break;
+  }
+  fprintf(stderr, ")\n");
+}
+
+/***/
+
 /// isEmptyStruct - Return true iff a structure has no non-empty
 /// members. Note that a structure with a flexible array member is not
 /// considered empty.





More information about the cfe-commits mailing list