From 5a9336bf254b1459f3d7bf33d98e7f0b45250b71 Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 3 Mar 2013 15:10:33 +0100 Subject: [PATCH] Fix another attribute problem with LLVM 3.3. --- gen/functions.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen/functions.cpp b/gen/functions.cpp index d74d4636..dc1b604a 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -97,7 +97,11 @@ llvm::FunctionType* DtoFunctionType(Type* type, Type* thistype, Type* nesttype, // Specifying nocapture on a parameter but then passing it as a // non-nocapture argument in a function call can lead to // _silent_ miscompilations (especially in the GVN pass). +#if LDC_LLVM_VER >= 303 + .addAttribute(llvm::Attribute::NoCapture) +#else .addAttribute(llvm::Attributes::NoCapture) +#endif #endif #if LDC_LLVM_VER == 302 )