From: weiyu <weiyuluo1232@gmail.com>
Date: Sat, 12 Dec 2020 21:28:52 +0000 (-0800)
Subject: fix scripts and make code compatible with old clang
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b260d952a65641ec003a31ebaf8a0c1a6c00db76;p=c11concurrency-benchmarks.git

fix scripts and make code compatible with old clang
---

diff --git a/clang b/clang
index 7c38cb7..9e98dbe 100755
--- a/clang
+++ b/clang
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang -fsanitize=thread -Wno-unused-command-line-argument $@
diff --git a/clang++ b/clang++
index c85f476..5b32812 100755
--- a/clang++
+++ b/clang++
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang++ -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang++ -fsanitize=thread -std=c++11 -Wno-unused-command-line-argument $@
diff --git a/g++ b/g++
index c85f476..5b32812 100755
--- a/g++
+++ b/g++
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang++ -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang++ -fsanitize=thread -std=c++11 -Wno-unused-command-line-argument $@
diff --git a/gcc b/gcc
index 7c38cb7..9e98dbe 100755
--- a/gcc
+++ b/gcc
@@ -1,3 +1,3 @@
 #/bin/bash
 
-/home/vagrant/llvm/build/bin/clang -Xclang -load -Xclang /home/vagrant/llvm/build/lib/libCDSPass.so -L/home/vagrant/c11tester -lmodel -Wno-unused-command-line-argument $@
+/data/tsan11_build/llvm_patched_build/bin/clang -fsanitize=thread -Wno-unused-command-line-argument $@
diff --git a/silo/txn_proto2_impl.h b/silo/txn_proto2_impl.h
index 83021ab..cd358ae 100644
--- a/silo/txn_proto2_impl.h
+++ b/silo/txn_proto2_impl.h
@@ -708,11 +708,11 @@ txn_logger::pbuffer::can_hold_tid(uint64_t tid) const
 
 // protocol 2 - no global consistent TIDs
 template <typename Traits>
-class transaction_proto2 : public transaction<transaction_proto2, Traits>,
+class transaction_proto2 : public transaction<::transaction_proto2, Traits>,
                            private transaction_proto2_static {
 
-  friend class transaction<transaction_proto2, Traits>;
-  typedef transaction<transaction_proto2, Traits> super_type;
+  friend class transaction<::transaction_proto2, Traits>;
+  typedef transaction<::transaction_proto2, Traits> super_type;
 
 public:
 
@@ -728,7 +728,7 @@ public:
 
   transaction_proto2(uint64_t flags,
                      typename Traits::StringAllocator &sa)
-    : transaction<transaction_proto2, Traits>(flags, sa)
+    : transaction<::transaction_proto2, Traits>(flags, sa)
   {
     if (this->get_flags() & transaction_base::TXN_FLAG_READ_ONLY) {
       const uint64_t global_tick_ex =
@@ -963,7 +963,7 @@ public:
   void
   dump_debug_info() const
   {
-    transaction<transaction_proto2, Traits>::dump_debug_info();
+    transaction<::transaction_proto2, Traits>::dump_debug_info();
     if (this->is_snapshot())
       std::cerr << "  last_consistent_tid: "
         << g_proto_version_str(u_.last_consistent_tid) << std::endl;