Add support for __attribute__((hot)) and __attribute__((cold)).

Currently cold functions are marked with the "optsize" attribute in CodeGen
so they are always optimized for size.  The hot attribute is just ignored,
LLVM doesn't have a way to express hotness at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156723 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/attr-coldhot.c b/test/CodeGen/attr-coldhot.c
new file mode 100644
index 0000000..b9bb299
--- /dev/null
+++ b/test/CodeGen/attr-coldhot.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+
+int test1() __attribute__((__cold__)) {
+  return 42;
+
+// Check that we set the optsize attribute on the function.
+// CHECK: @test1{{.*}}optsize
+// CHECK: ret
+}