[PATCH] D36386: [clang] Remove unit test which uses reverse-iterate and fix a PointerLikeTypeTrait specialization
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 7 09:57:23 PDT 2017
Not sure I understand the context for these changes - could you describe
the motivation(s) in more detail?
On Sun, Aug 6, 2017 at 10:39 PM Mandeep Singh Grang via Phabricator <
reviews at reviews.llvm.org> wrote:
> mgrang created this revision.
>
> This patch is in response to https://reviews.llvm.org/D35043 which
> removed -reverse-iterate flag
> and the base definition for PointerLikeTypeTrait.
>
>
> https://reviews.llvm.org/D36386
>
> Files:
> include/clang/AST/ExternalASTSource.h
> test/Rewriter/objc-modern-metadata-visibility2.mm
>
>
> Index: test/Rewriter/objc-modern-metadata-visibility2.mm
> ===================================================================
> --- test/Rewriter/objc-modern-metadata-visibility2.mm
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -// REQUIRES: abi-breaking-checks
> -// NOTE: This test has been split from objc-modern-metadata-visibility.mm
> in
> -// order to test with -reverse-iterate as this flag is only present with
> -// ABI_BREAKING_CHECKS.
> -
> -// RUN: %clang_cc1 -E %s -o %t.mm -mllvm -reverse-iterate
> -// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions
> -rewrite-objc %t.mm -mllvm -reverse-iterate -o - | FileCheck %s
> -// rdar://11144048
> -
> - at class NSString;
> -
> - at interface NSObject {
> - Class isa;
> -}
> - at end
> -
> - at interface Sub : NSObject {
> - int subIvar;
> - NSString *nsstring;
> - at private
> - id PrivateIvar;
> -}
> - at end
> -
> - at implementation Sub
> -- (id) MyNSString { return subIvar ? PrivateIvar : nsstring; }
> - at end
> -
> - at interface NSString @end
> - at implementation NSString @end
> -
> -// CHECK: __declspec(allocate(".objc_ivar$B")) extern "C"
> __declspec(dllimport) unsigned long OBJC_IVAR_$_Sub$subIvar;
> -// CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" unsigned long
> OBJC_IVAR_$_Sub$PrivateIvar;
> -// CHECK: __declspec(allocate(".objc_ivar$B")) extern "C"
> __declspec(dllimport) unsigned long OBJC_IVAR_$_Sub$nsstring;
> -// CHECK: #pragma warning(disable:4273)
> -// CHECK: __declspec(allocate(".objc_ivar$B")) extern "C"
> __declspec(dllexport) unsigned long int OBJC_IVAR_$_Sub$subIvar
> -// CHECK: __declspec(allocate(".objc_ivar$B")) extern "C"
> __declspec(dllexport) unsigned long int OBJC_IVAR_$_Sub$nsstring
> -// CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" unsigned long
> int OBJC_IVAR_$_Sub$PrivateIvar
> -// CHECK: extern "C" __declspec(dllimport) struct _class_t
> OBJC_METACLASS_$_NSObject;
> -// CHECK: extern "C" __declspec(dllexport) struct _class_t
> OBJC_METACLASS_$_Sub
> -// CHECK: extern "C" __declspec(dllimport) struct _class_t
> OBJC_CLASS_$_NSObject;
> -// CHECK: extern "C" __declspec(dllexport) struct _class_t
> OBJC_CLASS_$_Sub
> -// CHECK: extern "C" __declspec(dllexport) struct _class_t
> OBJC_CLASS_$_NSString;
> -// CHECK: extern "C" __declspec(dllexport) struct _class_t
> OBJC_METACLASS_$_NSString
> -// CHECK: extern "C" __declspec(dllexport) struct _class_t
> OBJC_CLASS_$_NSString
> Index: include/clang/AST/ExternalASTSource.h
> ===================================================================
> --- include/clang/AST/ExternalASTSource.h
> +++ include/clang/AST/ExternalASTSource.h
> @@ -466,9 +466,10 @@
> namespace llvm {
> template<typename Owner, typename T,
> void (clang::ExternalASTSource::*Update)(Owner)>
> -struct PointerLikeTypeTraits<
> +class PointerLikeTypeTraits<
> clang::LazyGenerationalUpdatePtr<Owner, T, Update>> {
> typedef clang::LazyGenerationalUpdatePtr<Owner, T, Update> Ptr;
> +public:
> static void *getAsVoidPointer(Ptr P) { return P.getOpaqueValue(); }
> static Ptr getFromVoidPointer(void *P) { return
> Ptr::getFromOpaqueValue(P); }
> enum {
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170807/55ed4ddb/attachment.html>
More information about the cfe-commits
mailing list