[PATCH] D13330: Implement __attribute__((unique_instantiation))
David Majnemer via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 20 19:02:14 PDT 2015
majnemer added a subscriber: majnemer.
================
Comment at: include/clang/Basic/Attr.td:1463
@@ +1462,3 @@
+ let Spellings = [GNU<"unique_instantiation">];
+ let Subjects = SubjectList<[Function, CXXRecord], ErrorDiag>;
+ let Documentation = [UniqueInstantiationDocs];
----------------
What about variable templates?
================
Comment at: lib/Sema/SemaDecl.cpp:2288
@@ +2287,3 @@
+ if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(New)) {
+ TemplateSpecializationKind kind = CTSD->getSpecializationKind();
+ if (kind == TSK_ExplicitInstantiationDeclaration ||
----------------
Capital letters for variable names.
================
Comment at: test/CodeGenCXX/unique-instantiation.cpp:1
@@ +1,2 @@
+// RUN: %clang -std=c++11 -emit-llvm -O0 -c -S -o - %s | FileCheck %s
+
----------------
Is -O0 needed here?
http://reviews.llvm.org/D13330
More information about the cfe-commits
mailing list