removeduplicatedeclaration
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 25 Apr 2017 13:10:10 +0000 (13:10 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Tue, 25 Apr 2017 13:10:10 +0000 (13:10 +0000)
===================================================================

Gbp-Pq: Name removeduplicatedeclaration.diff

clang/lib/Basic/Targets.cpp

index 10384cd4e028d73b7c487c6763af1ed4fa3779ae..036430c36f3d922888d2bbe89013dbbc9b8bd80e 100644 (file)
@@ -4282,33 +4282,6 @@ protected:
     Builder.defineMacro("__ELF__");
   }
 
-  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:
   RTEMSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)