summaryrefslogtreecommitdiff
path: root/debian/patches/removeduplicatedeclaration.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/removeduplicatedeclaration.diff')
-rw-r--r--debian/patches/removeduplicatedeclaration.diff40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/removeduplicatedeclaration.diff b/debian/patches/removeduplicatedeclaration.diff
new file mode 100644
index 0000000..0a750d6
--- /dev/null
+++ b/debian/patches/removeduplicatedeclaration.diff
@@ -0,0 +1,40 @@
+---
+ clang/lib/Basic/Targets.cpp | 27 ---------------------------
+ 1 file changed, 27 deletions(-)
+
+--- a/clang/lib/Basic/Targets.cpp
++++ b/clang/lib/Basic/Targets.cpp
+@@ -4414,33 +4414,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)