[PATCH] D12834: add gcc abi_tag support

Stefan B├╝hler via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 27 05:22:13 PDT 2015


stbuehler added a comment.

Just for the record: substitution doesn't work yet (it should add available tags from the substitution, but doesn't).

This example shows the difference: my patch mangles `T::F()` as `N::Name(N::__test::Result)::T::F[abi:test](N::__test::Result)`, but actually shouldn't emit the abi tag.

  namespace N {
    inline namespace __test
    __attribute__((abi_tag("test"))) {
      struct Result {
        const char *str;
      };
    }
  
    inline Result Name(Result p1) {
      struct T {
        Result F(Result p2) {
          struct S {
            Result F(Result p3) {
              static Result s3 = p3;
              return s3;
            }
          };
          static Result s2 = S().F(p2);
          return s2;
        }
      };
      static Result s1 = T().F(p1);
      return s1;
    }
  
    void F() {
      // instantiate Name()
      Name(Result());
    }
  }


Repository:
  rL LLVM

http://reviews.llvm.org/D12834





More information about the cfe-commits mailing list