[esan][cfrag] Add skeleton for cache fragmentation tool support

Summary:
Adds cache_frag.h and cache_frag.cpp for the cache fragmentation tool.

Updates test struct-simple.cpp.

Reviewers: aizatsky

Subscribers: filcab, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening, kubabrecka

Differential Revision: http://reviews.llvm.org/D20538

llvm-svn: 270737
diff --git a/compiler-rt/lib/esan/cache_frag.cpp b/compiler-rt/lib/esan/cache_frag.cpp
new file mode 100644
index 0000000..1ab8699
--- /dev/null
+++ b/compiler-rt/lib/esan/cache_frag.cpp
@@ -0,0 +1,40 @@
+//===-- cache_frag.cpp ----------------------------------------------------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of EfficiencySanitizer, a family of performance tuners.
+//
+// This file contains cache fragmentation-specific code.
+//===----------------------------------------------------------------------===//
+
+#include "esan.h"
+
+namespace __esan {
+
+//===-- Init/exit functions -----------------------------------------------===//
+
+void processCacheFragCompilationUnitInit(void *Ptr) {
+  VPrintf(2, "in esan::%s\n", __FUNCTION__);
+}
+
+void processCacheFragCompilationUnitExit(void *Ptr) {
+  VPrintf(2, "in esan::%s\n", __FUNCTION__);
+}
+
+void initializeCacheFrag() {
+  VPrintf(2, "in esan::%s\n", __FUNCTION__);
+}
+
+int finalizeCacheFrag() {
+  VPrintf(2, "in esan::%s\n", __FUNCTION__);
+  // FIXME: add the cache fragmentation final report.
+  Report("%s is not finished: nothing yet to report\n", SanitizerToolName);
+  return 0;
+}
+
+} // namespace __esan