aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-04 23:24:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-04 23:24:38 +0000
commit6f7279bf98e31356306386b2c200820a76b491cf (patch)
tree754582aa3934bd5eb6c3843e07a45186bd1d5c9b /lib/CodeGen/CGCall.cpp
parenteeb15d499f032bb89773ddaca2d17475122a37bb (diff)
Add ABIArgInfo::dump()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index a13b232571..a3dd877ce5 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -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 @@ const CGFunctionInfo &CodeGenTypes::getFunctionInfo(QualType ResTy,
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.