removeduplicatedeclaration
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Sun, 12 Mar 2017 08:49:18 +0000 (08:49 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sun, 12 Mar 2017 08:49:18 +0000 (08:49 +0000)
===================================================================

Gbp-Pq: Name removeduplicatedeclaration.diff

clang/lib/Basic/Targets.cpp

index 95861e1e27f22b979a1b1677ab6a46d48747aa81..f4a4cc85ce5b442d2b4e978702ef3d5cda2b7c57 100644 (file)
@@ -4467,33 +4467,6 @@ class ARMTargetInfo : public TargetInfo {
     }
   }
 
-  static bool shouldUseInlineAtomic(const llvm::Triple &T) {
-    // On linux, binaries targeting old cpus call functions in libgcc to
-    // perform atomic operations. The implementation in libgcc then calls into
-    // the kernel which on armv6 and newer uses ldrex and strex. The net result
-    // is that if we assume the kernel is at least as recent as the hardware,
-    // it is safe to use atomic instructions on armv6 and newer.
-    if (T.getOS() != llvm::Triple::Linux)
-     return false;
-    StringRef ArchName = T.getArchName();
-    if (T.getArch() == llvm::Triple::arm) {
-      if (!ArchName.startswith("armv"))
-        return false;
-      StringRef VersionStr = ArchName.substr(4);
-      unsigned Version;
-      if (VersionStr.getAsInteger(10, Version))
-        return false;
-      return Version >= 6;
-    }
-    assert(T.getArch() == llvm::Triple::thumb);
-    if (!ArchName.startswith("thumbv"))
-      return false;
-    StringRef VersionStr = ArchName.substr(6);
-    unsigned Version;
-    if (VersionStr.getAsInteger(10, Version))
-      return false;
-    return Version >= 7;
-  }
 
 public:
   ARMTargetInfo(const llvm::Triple &Triple, bool IsBigEndian)