Adding a collector name attribute to Function in the IR. These 
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to 
collector names, such that there is no overhead. A StringPool is 
further used to unique collector names, which are extremely
likely to be unique per process.

llvm-svn: 44769
diff --git a/llvm/test/CodeGen/Generic/GC/alloc_loop.ll b/llvm/test/CodeGen/Generic/GC/alloc_loop.ll
index b479cdb..b1fee68 100644
--- a/llvm/test/CodeGen/Generic/GC/alloc_loop.ll
+++ b/llvm/test/CodeGen/Generic/GC/alloc_loop.ll
@@ -7,7 +7,7 @@
 declare void @llvm.gcroot(i8**, i8*)
 declare void @llvm.gcwrite(i8*, i8*, i8**)
 
-define i32 @main() {
+define i32 @main() gc "shadow-stack" {
 entry:
 	%A = alloca i8*
 	%B = alloca i8**