Change StackDepot interface to use StackTrace more extensively

llvm-svn: 220637
diff --git a/compiler-rt/lib/tsan/dd/dd_rtl.cc b/compiler-rt/lib/tsan/dd/dd_rtl.cc
index de9a58f..44de617 100644
--- a/compiler-rt/lib/tsan/dd/dd_rtl.cc
+++ b/compiler-rt/lib/tsan/dd/dd_rtl.cc
@@ -19,13 +19,13 @@
 static Context *ctx;
 
 static u32 CurrentStackTrace(Thread *thr, uptr skip) {
-  BufferedStackTrace trace;
+  BufferedStackTrace stack;
   thr->ignore_interceptors = true;
-  trace.Unwind(1000, 0, 0, 0, 0, 0, false);
+  stack.Unwind(1000, 0, 0, 0, 0, 0, false);
   thr->ignore_interceptors = false;
-  if (trace.size <= skip)
+  if (stack.size <= skip)
     return 0;
-  return StackDepotPut(trace.trace + skip, trace.size - skip);
+  return StackDepotPut(StackTrace(stack.trace + skip, stack.size - skip));
 }
 
 static void PrintStackTrace(Thread *thr, u32 stk) {
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
index 4d81463..d4d11c1 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
@@ -462,8 +462,8 @@
     thr->shadow_stack_pos[0] = pc;
     thr->shadow_stack_pos++;
   }
-  u32 id = StackDepotPut(thr->shadow_stack,
-                         thr->shadow_stack_pos - thr->shadow_stack);
+  u32 id = StackDepotPut(__sanitizer::StackTrace(
+      thr->shadow_stack, thr->shadow_stack_pos - thr->shadow_stack));
   if (pc != 0)
     thr->shadow_stack_pos--;
   return id;