aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-24 19:08:58 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-24 19:08:58 +0000
commit31777a2540879051a3c643b90e02c3fd3d315243 (patch)
tree0243ab951ccd6f6c72277b0d5759d332ea6cdb6e /lib/CodeGen/CGCall.h
parent5132655e4296b780672e9a96b46a740135073534 (diff)
Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.h')
-rw-r--r--lib/CodeGen/CGCall.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h
index ebf801dcaa..041d1df0b0 100644
--- a/lib/CodeGen/CGCall.h
+++ b/lib/CodeGen/CGCall.h
@@ -15,7 +15,8 @@
#ifndef CLANG_CODEGEN_CGCALL_H
#define CLANG_CODEGEN_CGCALL_H
-#include <llvm/ADT/FoldingSet.h>
+#include "llvm/ADT/FoldingSet.h"
+#include "llvm/Value.h"
#include "clang/AST/Type.h"
#include "CGValue.h"
@@ -123,6 +124,21 @@ namespace CodeGen {
begin->Profile(ID);
}
};
+
+ class ReturnValueSlot {
+ llvm::PointerIntPair<llvm::Value *, 1, bool> Value;
+
+ public:
+ ReturnValueSlot() {}
+ ReturnValueSlot(llvm::Value *Value, bool IsVolatile)
+ : Value(Value, IsVolatile) {}
+
+ bool isNull() const { return !getValue(); }
+
+ bool isVolatile() const { return Value.getInt(); }
+ llvm::Value *getValue() const { return Value.getPointer(); }
+ };
+
} // end namespace CodeGen
} // end namespace clang