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
diff --git a/lib/CodeGen/CGCall.h b/lib/CodeGen/CGCall.h
index ebf801d..041d1df 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 @@
         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