diff options
author | dim <dim@FreeBSD.org> | 2017-12-26 14:44:02 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-02-21 15:19:36 -0300 |
commit | ec9fc666d7930ca3c4404c65f66b1058774bc764 (patch) | |
tree | e7414581cd9c06d4b7c7049b30f8b58a91d5da15 /contrib/llvm/tools/clang/lib/AST | |
parent | ccc29696d4051a58a5fc07d4aef5be6a99d2bff6 (diff) | |
download | FreeBSD-src-ec9fc666d7930ca3c4404c65f66b1058774bc764.zip FreeBSD-src-ec9fc666d7930ca3c4404c65f66b1058774bc764.tar.gz |
MFC r326496:
Upgrade our copies of clang, llvm, lldb and libc++ to r319231 from the
upstream release_50 branch. This corresponds to 5.0.1 rc2.
MFC r326831:
Pull in r315334 from upstream lld trunk (by Rafael Espindola):
Don't create a dummy __tls_get_addr.
We just don't need one with the current setup.
We only error on undefined references that are used by some
relocation.
If we managed to relax all uses of __tls_get_addr, no relocation uses
it and we don't produce an error.
This is less code and fixes the case were we fail to relax. Before we
would produce a broken output, but now we produce an error.
Pull in r320390 from upstream lld trunk (by Rafael Espindola):
Create reserved symbols early so they can be versioned.
This fixes pr35570.
We were creating these symbols after parsing version scripts, so they
could not be versioned.
We cannot move the version script parsing later because we need it for
lto.
One option is to move both addReservedSymbols and
createSyntheticSections earlier. The disadvantage is that some
sections created by createSyntheticSections replace other input
sections. For example, gdb index replaces .debug_gnu_pubnames, so it
wants to run after gc sections so that it can set S->Live to false.
What this patch does instead is to move just the ElfHeader creation
early.
Pull in r320412 from upstream lld trunk (by Rafael Espindola):
Handle symbols pointing to output sections.
Now that gc sections runs after linker defined symbols are added it
can see symbols that point to an OutputSection.
Should fix a bot failure.
Pull in r320431 from upstream lld trunk (by Peter Collingbourne):
ELF: Do not follow relocation edges to output sections during GC.
This fixes an assertion error introduced by r320390.
Differential Revision: https://reviews.llvm.org/D41095
Together these fix handling of reserved symbols, in particular _end,
which is needed to make brk(2) and sbrk(2) work correctly. This
unbreaks the emacs ports on amd64, and also appears to unbreak most of
world on i386.
Differential Revision: https://reviews.freebsd.org/D13466
MFC r326879 (by emaste):
lld: Simplify a boolean expression by De Morgan's laws.
Cherry-pick lld r315653 by Rui Ueyama:
I don't really understand what exactly this expression means,
but at least I can mechanically transform it.
Obtained from: LLVM r315653
MFC r326897 (by emaste):
lld: Slightly simplify code and add comment.
Cherry-pick lld r315658 by Rui Ueyama:
This is not a mechanical transformation. Even though I believe this
patch is correct, I'm not 100% sure if lld with this patch behaves
exactly the same way as before on all edge cases. At least all tests
still pass.
I'm submitting this patch because it took almost a day to understand
this function, and I don't want to lose it.
This fixes jemalloc assertion failures observed at startup with i386
binaries and an lld-linked libc.so.
Reviewed by: dim
Obtained from: LLVM r315658
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D13503
MFC r326909:
Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to
5.0.1 release (upstream r320880).
Relnotes: yes
MFC r326957 (by emaste):
lld: Don't write preemptible symbol values to the .got.
It is not necessary and matches what bfd and gold do.
This was a regression from [LLVM] r315658.
Obtained from: LLVM r321023 by Rafael EspĂndola
(cherry picked from commit 1bc68d01849a9c2d056c4cab94b4097bd14c313c)
Diffstat (limited to 'contrib/llvm/tools/clang/lib/AST')
-rw-r--r-- | contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp b/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp index df02e10..74c9953 100644 --- a/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp +++ b/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp @@ -537,7 +537,7 @@ namespace { /// rules. For example, the RHS of (0 && foo()) is not evaluated. We can /// evaluate the expression regardless of what the RHS is, but C only allows /// certain things in certain situations. - struct LLVM_ALIGNAS(/*alignof(uint64_t)*/ 8) EvalInfo { + struct EvalInfo { ASTContext &Ctx; /// EvalStatus - Contains information about the evaluation. @@ -977,24 +977,22 @@ namespace { /// RAII object used to optionally suppress diagnostics and side-effects from /// a speculative evaluation. class SpeculativeEvaluationRAII { - /// Pair of EvalInfo, and a bit that stores whether or not we were - /// speculatively evaluating when we created this RAII. - llvm::PointerIntPair<EvalInfo *, 1, bool> InfoAndOldSpecEval; - Expr::EvalStatus Old; + EvalInfo *Info = nullptr; + Expr::EvalStatus OldStatus; + bool OldIsSpeculativelyEvaluating; void moveFromAndCancel(SpeculativeEvaluationRAII &&Other) { - InfoAndOldSpecEval = Other.InfoAndOldSpecEval; - Old = Other.Old; - Other.InfoAndOldSpecEval.setPointer(nullptr); + Info = Other.Info; + OldStatus = Other.OldStatus; + Other.Info = nullptr; } void maybeRestoreState() { - EvalInfo *Info = InfoAndOldSpecEval.getPointer(); if (!Info) return; - Info->EvalStatus = Old; - Info->IsSpeculativelyEvaluating = InfoAndOldSpecEval.getInt(); + Info->EvalStatus = OldStatus; + Info->IsSpeculativelyEvaluating = OldIsSpeculativelyEvaluating; } public: @@ -1002,8 +1000,8 @@ namespace { SpeculativeEvaluationRAII( EvalInfo &Info, SmallVectorImpl<PartialDiagnosticAt> *NewDiag = nullptr) - : InfoAndOldSpecEval(&Info, Info.IsSpeculativelyEvaluating), - Old(Info.EvalStatus) { + : Info(&Info), OldStatus(Info.EvalStatus), + OldIsSpeculativelyEvaluating(Info.IsSpeculativelyEvaluating) { Info.EvalStatus.Diag = NewDiag; Info.IsSpeculativelyEvaluating = true; } |