[llvm-commits] CVS: llvm/include/llvm/Support/CallSite.h
Brian Gaeke
gaeke at cs.uiuc.edu
Fri Nov 7 13:26:07 PST 2003
Changes in directory llvm/include/llvm/Support:
CallSite.h updated: 1.11 -> 1.12
---
Log message:
Add a warning about not "new"ing or "delete"ing CallSites
---
Diffs of the changes: (+6 -0)
Index: llvm/include/llvm/Support/CallSite.h
diff -u llvm/include/llvm/Support/CallSite.h:1.11 llvm/include/llvm/Support/CallSite.h:1.12
--- llvm/include/llvm/Support/CallSite.h:1.11 Wed Nov 5 14:25:33 2003
+++ llvm/include/llvm/Support/CallSite.h Fri Nov 7 13:25:22 2003
@@ -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
More information about the llvm-commits
mailing list