Add a warning about not "new"ing or "delete"ing CallSites
authorBrian Gaeke <gaeke@uiuc.edu>
Fri, 7 Nov 2003 19:25:22 +0000 (19:25 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Fri, 7 Nov 2003 19:25:22 +0000 (19:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9782 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CallSite.h

index 6811626ccc63e71b1558b8bb3205286fb4abb57a..5e3fd3e6626a9126c8b3fe9b18a2131582d07116 100644 (file)
 // This file defines the CallSite class, which is a handy wrapper for code that
 // wants to treat Call and Invoke instructions in a generic way.
 //
+// NOTE: This class is supposed to have "value semantics". So it should be
+// passed by value, not by reference; it should not be "new"ed or "delete"d. It
+// is efficiently copyable, assignable and constructable, with cost equivalent
+// to copying a pointer. (You will notice that it has only a single data
+// member.)
+//
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_SUPPORT_CALLSITE_H