rjmccall added a comment.
Top-level attributes shouldn't really be affecting the ABI or code-generation
in any way, so desugaring should be fine.
http://reviews.llvm.org/D20407
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.ll
rjmccall added a comment.
That looks great, thank you.
http://reviews.llvm.org/D20113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added inline comments.
Comment at: lib/Sema/SemaType.cpp:1569
@@ +1568,3 @@
+// Mark them as invalid.
+attr.setInvalid();
+ }
It's not generally a good idea to set things as invalid if you're just emitting
a warning. It might be dif
rjmccall added a comment.
If multiple cleanups can be entered, the appropriate thing to do is enter a
RunCleanupsScope of some sort and then pop it at the right time. But you
should find out why the cleanup is being entered — it's possible that it's not
being properly bound to a full-expressio
rjmccall added inline comments.
Comment at: lib/CodeGen/ItaniumCXXABI.cpp:174
@@ +173,3 @@
+else
+ Align = CGM.getContext().getTargetDefaultAlignForAttributeAligned();
+
Just add a ExnObjectAlignment field to TargetInfo, please. We already have a
Darwin
rjmccall added a comment.
In http://reviews.llvm.org/D18618#387847, @ahatanak wrote:
> In CodeGenFunction::EmitARCRetainScalarExpr, if I move the declaration of
> "scope" above the call to enterFullExpression, the cleanup is popped before
> the loop body is entered right after the method return
rjmccall added a comment.
Otherwise, LGTM.
Repository:
rL LLVM
http://reviews.llvm.org/D18479
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added inline comments.
Comment at: cfe/trunk/include/clang/Basic/TargetInfo.h:426
@@ +425,3 @@
+/// we assume that alignment here. (It's generally 16 bytes, but
+/// some targets overwrite it.)
+return getDefaultAlignForAttributeAligned();
Th
rjmccall added inline comments.
Comment at: lib/Sema/SemaType.cpp:1569
@@ +1568,3 @@
+// Mark them as invalid.
+attr.setInvalid();
+ }
manmanren wrote:
> rjmccall wrote:
> > It's not generally a good idea to set things as invalid if you're jus
rjmccall added a comment.
LGTM.
http://reviews.llvm.org/D18196
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:1421
@@ -1415,1 +1420,3 @@
+else
+ return Builder.CreateBitCast(Src, DstTy);
}
This is just CreatePointerBitCastOrAddrSpaceCast.
http://reviews.llvm.org/D18713
__
rjmccall added a comment.
LGTM, thanks!
http://reviews.llvm.org/D18713
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
> On Apr 1, 2016, at 3:50 PM, Nico Weber wrote:
> On Thu, Mar 10, 2016 at 8:30 PM, John McCall via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> Author: rjmccall
> Date: Thu Mar 10 22:30:31 2016
> New Revision: 263191
>
> URL: http://llvm.org/viewvc/ll
Author: rjmccall
Date: Mon Apr 4 13:33:08 2016
New Revision: 265324
URL: http://llvm.org/viewvc/llvm-project?rev=265324&view=rev
Log:
IRGen-level lowering for the Swift calling convention.
Added:
cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h
cfe/trunk/lib/CodeGen/SwiftCallingConv.cp
Author: rjmccall
Date: Mon Apr 4 13:33:00 2016
New Revision: 265323
URL: http://llvm.org/viewvc/llvm-project?rev=265323&view=rev
Log:
Add a couple of convenience operations to CharUnits.
Modified:
cfe/trunk/include/clang/AST/CharUnits.h
Modified: cfe/trunk/include/clang/AST/CharUnits.h
URL:
> On Apr 4, 2016, at 11:49 AM, Sean Silva wrote:
> On Mon, Apr 4, 2016 at 11:33 AM, John McCall via cfe-commits
> mailto:cfe-commits@lists.llvm.org>> wrote:
> Author: rjmccall
> Date: Mon Apr 4 13:33:00 2016
> New Revision: 265323
>
> URL: http://llvm.org/viewv
Author: rjmccall
Date: Mon Apr 4 13:53:01 2016
New Revision: 265328
URL: http://llvm.org/viewvc/llvm-project?rev=265328&view=rev
Log:
Assignment operators should return by reference.
Thanks to Sean Silva for pointing this out.
Modified:
cfe/trunk/include/clang/AST/CharUnits.h
Modified: cfe
Author: rjmccall
Date: Mon Apr 4 15:39:50 2016
New Revision: 265344
URL: http://llvm.org/viewvc/llvm-project?rev=265344&view=rev
Log:
Fix an unused-variable warning by using the variable in the place
it was supposed to have been used.
Modified:
cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp
rjmccall added a comment.
LGTM, thanks!
http://reviews.llvm.org/D18618
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added inline comments.
Comment at: include/clang/Basic/AttrDocs.td:2371
@@ +2370,3 @@
+
+Not all targets support this attribute. ELF targets support this attribute
when using binutils v2.20.1 or higher and glibc v2.11.1 or higher. Non-ELF
targets currently do not supp
rjmccall added a comment.
It requires careful IRGen support which at one point did not exist. When I
implemented VLAs of __strong/__weak references for ARC, I deliberately tried to
make sure that the infrastructure would also work for the C++ cases, but I
didn't have time to go actually test a
rjmccall added a comment.
In the cases where we can emit nonnull, I agree that we should be able to
safely use dereferenceable for the non-virtual data size of of the type. I'm
not too concerned about people calling methods on entirely the wrong type,
especially to the relatively small degree
rjmccall added a comment.
Seems okay to me. Normally we wouldn't want to remove an attribute from the
DeclSpec because it can apply to multiple declarators, but that's not possible
with a block-literal declarator, so it's fine. Richard should sign off, though.
http://reviews.llvm.org/D18567
rjmccall added a comment.
IIRC, isInSystemHeader isn't a terribly cheap check. Please extract this into
a function that only needs to be called if the other checks succeed.
You should also be able to just ask about the first declaration. There are
contrived situations where isInSystemHeader c
rjmccall added inline comments.
Comment at: lib/Sema/SemaOverload.cpp:9191
@@ -9189,1 +9190,3 @@
+ ToTy->isLValueReferenceType() &&
+ !FromExpr->isLValue() &&
ToTy.getNonReferenceType().getCanonicalType() ==
Interleaving
rjmccall added a comment.
LGTM, thanks.
http://reviews.llvm.org/D19278
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added inline comments.
Comment at: lib/Frontend/CompilerInstance.cpp:763
@@ -762,8 +762,3 @@
Includers.push_back(std::make_pair(FindFile, FindFile->getDir()));
- File = HS->LookupFile(InputFile, SourceLocation(), /*isAngled=*/false,
-
rjmccall added inline comments.
Comment at: lib/Sema/SemaExceptionSpec.cpp:260
@@ -261,1 +259,3 @@
+ (First->getLocation().isInvalid() ||
+ Context.getSourceManager().isInSystemHeader(First->getLocation( {
New->setType(Context.getFunctionType(
rjmccall added inline comments.
Comment at: lib/Sema/SemaExceptionSpec.cpp:260
@@ -261,1 +259,3 @@
+ (First->getLocation().isInvalid() ||
+ Context.getSourceManager().isInSystemHeader(First->getLocation( {
New->setType(Context.getFunctionType(
rjmccall added inline comments.
Comment at: lib/Frontend/CompilerInstance.cpp:763
@@ -762,8 +762,3 @@
Includers.push_back(std::make_pair(FindFile, FindFile->getDir()));
- File = HS->LookupFile(InputFile, SourceLocation(), /*isAngled=*/false,
-
rjmccall added inline comments.
Comment at: include/clang/AST/Type.h:1084
@@ +1083,3 @@
+ /// Strip typedefs and atomic from the given type.
+ QualType getDesugaredAtomicValueType(const ASTContext &ctx) const;
+
Please name this getAtomicUnqualifiedType() and ha
rjmccall added inline comments.
Comment at: lib/AST/Type.cpp:1282
@@ -1277,1 +1281,3 @@
+}
+
Optional> Type::getObjCSubstitutions(
ahatanak wrote:
> I added getTypePtr() because the code didn't compile.
Sure.
Comment at: lib/CodeGen/CGObjC.cpp:9
rjmccall added a comment.
In http://reviews.llvm.org/D20407#439887, @ahatanak wrote:
> I reverted the changes I made in SemaDeclObjC.cpp as they weren't needed to
> pass the regression tests I added. clang still asserts when it compiles an
> objective-c method returning _Atomic and those change
rjmccall added a comment.
In http://reviews.llvm.org/D20407#440050, @ahatanak wrote:
> In http://reviews.llvm.org/D20407#439951, @rjmccall wrote:
>
> > The C standard is poorly-written in this area, but I think it would be
> > reasonable for CheckFunctionReturnType to just silently remove _Atomi
rjmccall added a comment.
One minor improvement to the API and LGTM.
Comment at: include/clang/AST/Type.h:1084
@@ +1083,3 @@
+ /// Remove all qualifiers including _Atomic.
+ QualType getAtomicUnqualifiedType(const ASTContext &ctx) const;
+
This doesn't need an
rjmccall added a comment.
Oh sure, because we don't strip the original type if there isn't a conflict.
LGTM.
http://reviews.llvm.org/D20843
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
rjmccall added a comment.
Hmm. No, I think the original code is correct here — RangeEnd is a token
range, and those are generally inclusive rather than exclusive. The fix-it
needs to be inserting at the end of the token.
http://reviews.llvm.org/D20844
_
rjmccall added a comment.
LGTM.
http://reviews.llvm.org/D20844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Yeah, 2048 is clearly too few. The other changes aren't necessary; if we're
going to try to be that generous, there's a lot of places in the AST that need
to be updated.
Comment at: lib/CodeGen/CGCleanup.h:61
@@ -60,3 +60,3 @@
-unsigned NumHand
rjmccall added a comment.
That looks great, thanks.
http://reviews.llvm.org/D21566
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Hmm. On MIPS64, a slot is 64 bits, right? How is a float passed?
http://reviews.llvm.org/D21611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Oh, floats are promoted to doubles in varargs, of course, which neatly makes
that an impossible situation.
My inclination is that the right condition here is that only integer types
should be right-justified in their slot, but I'll admit to not having an easy
example
rjmccall added inline comments.
Comment at: lib/CodeGen/CodeGenFunction.h:2725
@@ -2724,3 +2724,3 @@
void EmitStoreOfScalar(llvm::Value *Value, Address Addr,
- bool Volatile, QualType Ty,
+ bool Volatile, bool Restrict, QualType T
rjmccall added inline comments.
Comment at: lib/CodeGen/CGStmt.cpp:537
@@ +536,3 @@
+ llvm::LLVMContext::MD_noalias),
+ NewScopeList));
+
This is a very strange representation. Every memory
Author: rjmccall
Date: Mon Feb 29 18:18:05 2016
New Revision: 262275
URL: http://llvm.org/viewvc/llvm-project?rev=262275&view=rev
Log:
Infrastructure improvements to Clang attribute TableGen.
This should make it easier to add new Attr subclasses.
Modified:
cfe/trunk/include/clang/AST/Attr.h
Author: rjmccall
Date: Mon Feb 29 18:49:02 2016
New Revision: 262278
URL: http://llvm.org/viewvc/llvm-project?rev=262278&view=rev
Log:
Generalize the consumed-parameter array on FunctionProtoType
to allow arbitrary data to be associated with a parameter.
Also, fix a bug where we apparently haven'
> On Feb 29, 2016, at 5:06 PM, Pariborz Jahanian wrote:
>> On Feb 29, 2016, at 4:49 PM, John McCall via cfe-commits
>> wrote:
>>
>> Author: rjmccall
>> Date: Mon Feb 29 18:49:02 2016
>> New Revision: 262278
>>
>> URL: http://llvm
Author: rjmccall
Date: Mon Feb 29 20:09:20 2016
New Revision: 262288
URL: http://llvm.org/viewvc/llvm-project?rev=262288&view=rev
Log:
Add an llvm_unreachable back to the autogeneration of this covered switch.
Modified:
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/utils/
Author: rjmccall
Date: Mon Feb 29 20:09:25 2016
New Revision: 262289
URL: http://llvm.org/viewvc/llvm-project?rev=262289&view=rev
Log:
Fix the template instantiation of ExtParameterInfos; tests to follow.
Modified:
cfe/trunk/include/clang/AST/Type.h
cfe/trunk/include/clang/Sema/Sema.h
er-enumerations
>
> <http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations>
Sorry, should be fixed in r262288. I’ll be back in a few hours, feel free to
revert if it doesn’t clear up.
John.
>
> -- Sean Silva
>
Author: rjmccall
Date: Tue Mar 1 00:27:40 2016
New Revision: 262308
URL: http://llvm.org/viewvc/llvm-project?rev=262308&view=rev
Log:
Better comments for ExtParameterInfo.
Modified:
cfe/trunk/include/clang/AST/Type.h
cfe/trunk/include/clang/Sema/Sema.h
Modified: cfe/trunk/include/clang/
Author: rjmccall
Date: Tue Mar 1 00:54:30 2016
New Revision: 262311
URL: http://llvm.org/viewvc/llvm-project?rev=262311&view=rev
Log:
Test template instantiation of ns_consumed and ns_returns_retained.
Modified:
cfe/trunk/test/SemaObjCXX/arc-templates.mm
Modified: cfe/trunk/test/SemaObjCXX/
Author: rjmccall
Date: Tue Mar 1 16:18:03 2016
New Revision: 262414
URL: http://llvm.org/viewvc/llvm-project?rev=262414&view=rev
Log:
Mangle extended qualifiers in the proper order and mangle the
ARC ownership-convention function type modifications.
According to the Itanium ABI, vendor extended
Author: rjmccall
Date: Wed Mar 2 18:10:03 2016
New Revision: 262551
URL: http://llvm.org/viewvc/llvm-project?rev=262551&view=rev
Log:
Improve some infrastructure for extended parameter infos and
fix a bug with the instantiation of ns_consumed parameter
attributes in ARC.
Modified:
cfe/trunk/
Author: rjmccall
Date: Thu Mar 3 00:39:32 2016
New Revision: 262587
URL: http://llvm.org/viewvc/llvm-project?rev=262587&view=rev
Log:
Semantic analysis for the swiftcall calling convention.
I've tried to keep the infrastructure behind parameter ABI
treatments fairly general.
Added:
cfe/trun
rjmccall added a comment.
LGTM.
Repository:
rL LLVM
http://reviews.llvm.org/D16797
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Hal, I think you're talking about a slightly different thing. This patch is
adding an assumption that C++ this pointers are non-null, but only when
-fno-delete-null-pointer-checks is not passed. The flag is therefore at least
somewhat functional. (I would argue that
rjmccall added a comment.
Er, sorry. You are not inspiring *me* to disagree with Chandler.
http://reviews.llvm.org/D17993
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Well, no, we can do it under a different flag and just ensure that
-fno-delete-null-pointer-checks *also* has the effect of disabling the
optimization.
But you are not inspiring to disagree with Chandler about whether this
optimization should be enabled by default.
rjmccall added a comment.
The right fix is probably at the PseudoObjectExpr level; you should probably be
looking at the semantic expressions instead of the syntactic.
http://reviews.llvm.org/D17627
___
cfe-commits mailing list
cfe-commits@lists.ll
rjmccall added inline comments.
Comment at: lib/Sema/SemaStmt.cpp:1448
@@ +1447,3 @@
+if (auto *OVE = dyn_cast(S)) {
+ // Look pass OVE for Decl.
+ if (Expr *E = OVE->getSourceExpr())
"Look past the OVE into the expression it binds."
===
rjmccall added a comment.
Thanks, LGTM.
http://reviews.llvm.org/D17627
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: rjmccall
Date: Thu Mar 10 22:30:31 2016
New Revision: 263191
URL: http://llvm.org/viewvc/llvm-project?rev=263191&view=rev
Log:
Preserve ExtParameterInfos into CGFunctionInfo.
As part of this, make the function-arrangement interfaces
a little simpler and more semantic.
NFC.
Modified:
Author: rjmccall
Date: Thu Mar 10 22:30:43 2016
New Revision: 263192
URL: http://llvm.org/viewvc/llvm-project?rev=263192&view=rev
Log:
Add a coerce-and-expand ABIArgInfo as a generalization of some
of the things we do with Expand / Direct.
NFC for now, but this will be used by swiftcall expansion
Author: rjmccall
Date: Thu Mar 10 22:55:21 2016
New Revision: 263193
URL: http://llvm.org/viewvc/llvm-project?rev=263193&view=rev
Log:
Speculatively attempt to fix the MSVC build by making some
methods non-private.
Modified:
cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h
Modified: cfe/trun
Author: rjmccall
Date: Thu Mar 10 23:03:01 2016
New Revision: 263194
URL: http://llvm.org/viewvc/llvm-project?rev=263194&view=rev
Log:
Removing the friend declaration was not a good idea.
Modified:
cfe/trunk/include/clang/CodeGen/CGFunctionInfo.h
Modified: cfe/trunk/include/clang/CodeGen/CGF
rjmccall added a comment.
The underscore check seems over-broad; we support a lot of language dialects
and runtimes besides the Itanium C++ runtime. This would be both more
conservative and more convincing if it were constrained to the functions that
we expect to put in v-tables.
http://revi
rjmccall added a comment.
Okay, first off, linkonce_odr is not an acceptable term to be introducing as an
attribute name. If we need this, we can find some way to describe it that
isn't a random internal compiler term.
More importantly, I don't understand how your problem is solved by linkonce
rjmccall added a comment.
It has side effects in the destructor. It's not copyable.
It could reasonably be made movable, however, now that we require C++11 as a
host requirement. (It was written before that was true.)
http://reviews.llvm.org/D18123
rjmccall added a comment.
Yes, I guess this is fine.
http://reviews.llvm.org/D18113
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
I see, they weren't being set on declarations, just definitions. Yes, this
seems reasonable.
http://reviews.llvm.org/D18071
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/lis
rjmccall added a comment.
In http://reviews.llvm.org/D14737#373532, @pete wrote:
> I stepped through this one in the debugger to make sure I had it right.
>
> So the reason the bit cast ends up not being needed is because we restricted
> this optimization to cases where the result type "isObjCOb
rjmccall added a comment.
Your use case violates the "ODR" restriction on linkonce_odr.
Do you maybe just want __attribute__((weak))?
Repository:
rL LLVM
http://reviews.llvm.org/D18095
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http
rjmccall added a comment.
linkonce_odr would allow them to be dropped if unused by the library. In fact,
we don't normally emit IR for functions that are linkonce and not used.
Do you actually want code in lib_common to e.g. inline the common
implementation instead of calling the optimized one
rjmccall added a comment.
Well, your overriding definitions will be strong definitions. The question is
whether you want to allow inning of the weak definitions, i.e. the
possibly-overridden ones, and there I would assume not.
Repository:
rL LLVM
http://reviews.llvm.org/D18095
_
rjmccall added a comment.
Member function comparisons of virtual functions aren't required to work
anyway. Itanium just happens to implement them in a way that kindof gets it
right (for simple cases).
Repository:
rL LLVM
http://reviews.llvm.org/D18071
___
rjmccall added a comment.
You can't call getFoundDecl() if !isSingleResult(). You should add a test case
that actually tests the possibility that this lookup will fail.
Repository:
rL LLVM
http://reviews.llvm.org/D18175
___
cfe-commits mailing
rjmccall added a comment.
Ignore Dave and fix the problem, please. :)
Repository:
rL LLVM
http://reviews.llvm.org/D18175
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Making UnresolvedSet copyable / movable seems reasonable to me.
http://reviews.llvm.org/D18123
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
It's languished because the idea itself has unavoidable problems with
incomplete types.
http://reviews.llvm.org/D18035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/
rjmccall added a comment.
Can you find where that bitcast is being added? I know that different parts of
IRGen are differently sensitive to types — it's possible that the return code
is one of those more-permissive places.
http://reviews.llvm.org/D14737
rjmccall added a comment.
Seems okay to me.
http://reviews.llvm.org/D17988
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Ah, okay, if you changed it to cast explicitly, that's all I was concerned
about.
http://reviews.llvm.org/D14737
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
rjmccall added a comment.
LGTM.
http://reviews.llvm.org/D18182
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Hmm. Checking whether LookupName returns false will catch a lot of simple
cases. I think the test case you need might have to be a lookup that finds
multiple overloads of a function in C++.
Repository:
rL LLVM
http://reviews.llvm.org/D18175
___
rjmccall added a comment.
Yes, LGTM.
http://reviews.llvm.org/D14737
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Thank you, LGTM.
Repository:
rL LLVM
http://reviews.llvm.org/D18175
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
You should talk to Reid or someone else involved in MSVC-style EH support to
ensure that they generate a reasonable code pattern for this.
You should also check that any back-end peepholes we have in place (null type
infos to signify a call-terminate landingpad?) aren'
rjmccall added inline comments.
Comment at: lib/Sema/SemaDeclCXX.cpp:4935-4943
@@ +4934,11 @@
+
+ bool HasStableAttr = Record->hasAttr();
+ bool HasUnstableAttr = Record->hasAttr();
+ if (HasStableAttr && HasUnstableAttr) {
+Diag(Record->getLocation(), diag::err_abi_mismatc
rjmccall added inline comments.
Comment at: lib/Sema/SemaDeclCXX.cpp:4935-4943
@@ +4934,11 @@
+
+ bool HasStableAttr = Record->hasAttr();
+ bool HasUnstableAttr = Record->hasAttr();
+ if (HasStableAttr && HasUnstableAttr) {
+Diag(Record->getLocation(), diag::err_abi_mismatc
rjmccall added a comment.
You still don't actually want linkonce_odr linkage. You don't want the weak
definition to be inlined, so it can't be ODR, and you want to force it to be
emitted in your library, so it can't be linkonce. You just want weak linkage.
There's an existing attribute for t
rjmccall added a comment.
Does your linker not supported dead-code stripping?
http://reviews.llvm.org/D18095
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
You could also get this effect by somehow making the definitions linkonce_odr
when they're linked in from the library. Or you could simply use the classic
static-archive technique of putting each symbol in its own object file and
linking against the whole thing as a s
rjmccall added a comment.
Yes, you should just stick with your post-processing pass or something like it.
The design of linkonce_odr linkage is that such definitions will only be
emitted when they are actually used. Even with this attribute, a translation
unit that consists solely of:
__att
rjmccall added a comment.
LGTM.
http://reviews.llvm.org/D18461
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added a comment.
Oh, you know, this should really propagate all the dependence bits, not just
instantiation-dependence. It would be safer, at least. You could probably
find a contrived example involving value-dependence.
http://reviews.llvm.org/D18461
rjmccall added a comment.
This looks great, thanks. A few minor comment tweaks and this will be ready to
commit.
Comment at: include/clang/AST/DeclBase.h:562
@@ -561,1 +561,3 @@
+ /// \brief Return true if this declaration is a definition of alias or ifunc.
+ bool hasDefin
rjmccall added inline comments.
Comment at: include/clang/AST/DeclBase.h:563
@@ +562,3 @@
+ /// \brief Return true if this declaration is a definition of alias or ifunc.
+ bool hasDefiningAttr() const;
+
aaron.ballman wrote:
> I think this function and getDefini
rjmccall added a comment.
LGTM, thanks.
http://reviews.llvm.org/D15647
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
rjmccall added inline comments.
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:259
@@ +258,3 @@
+def err_anyx86_interrupt_attribute : Error<
+ "interrupt service routine %select{must have 'void' return value|"
+ "can only have a pointer argument and an optional integer a
501 - 600 of 1051 matches
Mail list logo