summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-11-07 19:25:22 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-11-07 19:25:22 +0000
commita730103518c94b0a519e30db5493c48de0d08a7f (patch)
tree1757a4d1d010025b419fef7b50915f67e0f950b6 /llvm
parentd3af61d88344db6b1f15fad7a8175dfa201310c3 (diff)
downloadbcm5719-llvm-a730103518c94b0a519e30db5493c48de0d08a7f.tar.gz
bcm5719-llvm-a730103518c94b0a519e30db5493c48de0d08a7f.zip
Add a warning about not "new"ing or "delete"ing CallSites
llvm-svn: 9782
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/CallSite.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CallSite.h b/llvm/include/llvm/Support/CallSite.h
index 6811626ccc6..5e3fd3e6626 100644
--- a/llvm/include/llvm/Support/CallSite.h
+++ b/llvm/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
OpenPOWER on IntegriCloud