From 5be3e6ae9d6e8d5e35033bc4dd42d75c8e44b3de Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 13 Sep 2011 20:48:30 +0000 Subject: Turn off the generation of unaligned atomic load/store; I'm going to explicitly error out on such cases in the backend, at least for the moment. llvm-svn: 139640 --- clang/lib/CodeGen/CGObjC.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 8f5e1fb761d..456909bf537 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -378,7 +378,9 @@ static void emitStructGetterCall(CodeGenFunction &CGF, ObjCIvarDecl *ivar, /// accesses. They don't have to be fast, just faster than a function /// call and a mutex. static bool hasUnalignedAtomics(llvm::Triple::ArchType arch) { - return (arch == llvm::Triple::x86 || arch == llvm::Triple::x86_64); + // FIXME: Allow unaligned atomic load/store on x86. (It is not + // currently supported by the backend.) + return 0; } /// Return the maximum size that permits atomic accesses for the given -- cgit v1.2.3