diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-07 19:25:22 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-07 19:25:22 +0000 |
commit | 4ba0f57904613bb2ea0d7f0a8ff6a0c04647044d (patch) | |
tree | 73e7a0c18e7ec93983d2f0f1b6328ac3702f4697 | |
parent | 12a3f843ffaa34d22ddf4857c9047da4f693afec (diff) |
Add a warning about not "new"ing or "delete"ing CallSites
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9782 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/CallSite.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 6811626ccc..5e3fd3e662 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -10,6 +10,12 @@ // 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 |