|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
e72c195f |
| 10-Feb-2022 |
serge-sans-paille <[email protected]> |
Cleanup LLVMObject headers
Most notably,
llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h llvm/Object/TapiUn
Cleanup LLVMObject headers
Most notably,
llvm/Object/Binary.h no longer includes llvm/Support/MemoryBuffer.h llvm/Object/MachOUniversal*.h no longer include llvm/Object/Archive.h llvm/Object/TapiUniversal.h no longer includes llvm/Object/TapiFile.h
llvm-project preprocessed size: before: 1068185081 after: 1068324320
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D119457
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
| #
498a6136 |
| 15-Feb-2020 |
serge-sans-paille <[email protected]> |
Prevent gcc from issuing a warning upon coffnamecpy
This is a follow up to d1262a6e9, more explicit to cope with GCC smartness.
Differential Revision: https://reviews.llvm.org/D74666
|
|
Revision tags: llvmorg-10.0.0-rc2 |
|
| #
c55cf4af |
| 10-Feb-2020 |
Bill Wendling <[email protected]> |
Revert "Remove redundant "std::move"s in return statements"
The build failed with
error: call to deleted constructor of 'llvm::Error'
errors.
This reverts commit 1c2241a7936bf85aa68aef94bd40c3b
Revert "Remove redundant "std::move"s in return statements"
The build failed with
error: call to deleted constructor of 'llvm::Error'
errors.
This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
show more ...
|
| #
1c2241a7 |
| 10-Feb-2020 |
Bill Wendling <[email protected]> |
Remove redundant "std::move"s in return statements
|
|
Revision tags: llvmorg-10.0.0-rc1 |
|
| #
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <[email protected]> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
|
Revision tags: llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4 |
|
| #
d581dd50 |
| 04-Sep-2019 |
Martin Storsjo <[email protected]> |
[LLD] [COFF] Implement MinGW default manifest handling
In mingw environments, resources are normally compiled to resource object files directly, instead of letting the linker convert them to COFF fo
[LLD] [COFF] Implement MinGW default manifest handling
In mingw environments, resources are normally compiled to resource object files directly, instead of letting the linker convert them to COFF format.
Since some time, GCC supports the notion of a default manifest object. When invoking the linker, GCC looks for the default manifest object file, and if found in the expected path, it is added to linker commands.
The default manifest is one that indicates support for the latest known versions of windows, to implicitly unlock the modern behaviours of certain APIs.
Not all mingw/gcc distributions include this file, but e.g. in msys2, the default manifest object is distributed in a separate package (which can be but might not always be installed).
This means that even if user projects only use one single resource object file, the linker can end up with two resource object files, and thus needs to support merging them.
The default manifest has a language id of zero, and GNU ld has got logic for dropping a manifest with a zero language id, if there's another manifest present with a nonzero language id. If there are multiple manifests with a nonzero language id, the merging process errors out.
Differential Revision: https://reviews.llvm.org/D66825
llvm-svn: 370974
show more ...
|
|
Revision tags: llvmorg-9.0.0-rc3 |
|
| #
3d3a9b3b |
| 30-Aug-2019 |
Martin Storsjo <[email protected]> |
[LLD] [COFF] Support merging resource object files
Extend WindowsResourceParser to support using a ResourceSectionRef for loading resources from an object file.
Only allow merging resource object f
[LLD] [COFF] Support merging resource object files
Extend WindowsResourceParser to support using a ResourceSectionRef for loading resources from an object file.
Only allow merging resource object files in mingw mode; keep the existing error on multiple resource objects in link mode.
If there only is one resource object file and no .res resources, don't parse and recreate the .rsrc section, but just link it in without inspecting it. This allows users to produce any .rsrc section (outside of what the parser supports), just like before. (I don't have a specific need for this, but it reduces the risk of this new feature.)
Separate out the .rsrc section chunks in InputFiles.cpp, and only include them in the list of section chunks to link if we've determined that there only was one single resource object. (We need to keep other chunks from those object files, as they can legitimately contain other sections as well, in addition to .rsrc section chunks.)
Differential Revision: https://reviews.llvm.org/D66824
llvm-svn: 370436
show more ...
|
| #
d8d63ff2 |
| 30-Aug-2019 |
Martin Storsjo <[email protected]> |
[WindowsResource] Remove use of global variables in WindowsResourceParser
Instead of updating a global variable counter for the next index of strings and data blobs, pass along a reference to actual
[WindowsResource] Remove use of global variables in WindowsResourceParser
Instead of updating a global variable counter for the next index of strings and data blobs, pass along a reference to actual data/string vectors and let the TreeNode insertion methods add their data/strings to the vectors when a new entry is needed.
Additionally, if the resource tree had duplicates, that were ignored with -force:multipleres in lld, we no longer store all versions of the duplicated resource data, now we only keep the one that actually ends up referenced.
Differential Revision: https://reviews.llvm.org/D66823
llvm-svn: 370435
show more ...
|
| #
e62d5682 |
| 30-Aug-2019 |
Martin Storsjo <[email protected]> |
[WindowsResource] Avoid duplicating the input filenames for each resource. NFC.
Differential Revision: https://reviews.llvm.org/D66821
llvm-svn: 370434
|
| #
d1262a6e |
| 21-Aug-2019 |
Serge Guelton <[email protected]> |
Be explicit about Windows coff name trailing character policy
It's okay to *not* copy the trailing zero of a windows section/symbol name. This is compatible with strncpy behavior but gcc doesn't kno
Be explicit about Windows coff name trailing character policy
It's okay to *not* copy the trailing zero of a windows section/symbol name. This is compatible with strncpy behavior but gcc doesn't know that and throws an invalid warning. Encode this behavior in a proper function.
Differential Revision: https://reviews.llvm.org/D66420
llvm-svn: 369501
show more ...
|
|
Revision tags: llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init, llvmorg-8.0.1, llvmorg-8.0.1-rc4, llvmorg-8.0.1-rc3 |
|
| #
af6bc65d |
| 11-Jun-2019 |
Nico Weber <[email protected]> |
lld-link: Reject more than one resource .obj file
Users are exepcted to pass all .res files to the linker, which then merges all the resource in all .res files into a tree structure and then convert
lld-link: Reject more than one resource .obj file
Users are exepcted to pass all .res files to the linker, which then merges all the resource in all .res files into a tree structure and then converts the final tree structure to a .obj file with .rsrc$01 and .rsrc$02 sections and then links that.
If the user instead passes several .obj files containing such resources, the correct thing to do would be to have custom code to merge the trees in the resource sections instead of doing normal section merging -- but link.exe rejects if multiple resource obj files are passed in with LNK4078, so let lld-link do that too instead of silently writing broken .rsrc sections in that case.
The only real way to run into this is if users manually convert .res files to .obj files by running cvtres and then handing the resulting .obj files to lld-link instead, which in practice likely never happens.
(lld-link is slightly stricter than link.exe now: If link.exe is passed one .obj file created by cvtres, and a .res file, for some reason it just emits a warning instead of an error and outputs strange looking data. lld-link now errors out on mixed input like this.)
One way users could accidentally run into this is the following scenario: If a .res file is passed to lib.exe, then lib.exe calls cvtres.exe on the .res file before putting it in the output .lib. (llvm-lib currently doesn't do this.) link.exe's /wholearchive seems to only add obj files referenced from the static library index, but lld-link current really adds all files in the archive. So if lld-link /wholearchive is used with .lib files produced by lib.exe and .res files were among the files handed to lib.exe, we previously silently produced invalid output, but now we error out.
link.exe's /wholearchive semantics on the other hand mean that it wouldn't load the resource object files from the .lib file at all. Since this scenario is probably still an unlikely corner case, the difference in behavior here seems fine -- and lld-link might have to change to use link.exe's /wholearchive semantics in the future anyways.
Vaguely related to PR42180.
Differential Revision: https://reviews.llvm.org/D63109
llvm-svn: 363078
show more ...
|
| #
dd601952 |
| 11-Jun-2019 |
Nico Weber <[email protected]> |
Let writeWindowsResourceCOFF() take a TimeStamp parameter
For lld, pass in Config->Timestamp (which is set based on lld's /timestamp: and /Brepro flags). Since the writeWindowsResourceCOFF() data is
Let writeWindowsResourceCOFF() take a TimeStamp parameter
For lld, pass in Config->Timestamp (which is set based on lld's /timestamp: and /Brepro flags). Since the writeWindowsResourceCOFF() data is only used in-memory by LLD and the obj's timestamp isn't used for anything in the output, this doesn't change behavior.
For llvm-cvtres, add an optional /timestamp: parameter, and use the current behavior of calling time() if the parameter is not passed in.
This doesn't really change observable behavior (unless someone passes /timestamp: to llvm-cvtres, which wasn't possible before), but it removes the last unqualified call to time() from llvm/lib, which seems like a good thing.
Differential Revision: https://reviews.llvm.org/D63116
llvm-svn: 363050
show more ...
|
|
Revision tags: llvmorg-8.0.1-rc2, llvmorg-8.0.1-rc1 |
|
| #
81862f82 |
| 02-May-2019 |
Nico Weber <[email protected]> |
lld-link: Add /force:multipleres extension to make dupe resource diag non-fatal
As a side benefit, lld-link now reports more than one duplicate resource entry before exiting with an error even if th
lld-link: Add /force:multipleres extension to make dupe resource diag non-fatal
As a side benefit, lld-link now reports more than one duplicate resource entry before exiting with an error even if the new flag is not passed.
llvm-svn: 359829
show more ...
|
| #
413517ec |
| 02-May-2019 |
Nico Weber <[email protected]> |
lld-link: Make "duplicate resource" error message a bit more concise
Reduces the error message from: lld-link: error: failed to parse .res file: duplicate resource: type STRINGTABLE (ID 6)/name
lld-link: Make "duplicate resource" error message a bit more concise
Reduces the error message from: lld-link: error: failed to parse .res file: duplicate resource: type STRINGTABLE (ID 6)/name ID 3/language 1033, in test1.res and in test2.res
To: lld-link: error: duplicate resource: type STRINGTABLE (ID 6)/name ID 3/language 1033, in test1.res and in test2.res
Make sure every error message emitted by cvtres contains the name of at least one ".res" file, so that removing the "failed to parse .res file" string doesn't lose information.
Differential Revision: https://reviews.llvm.org/D61388
llvm-svn: 359749
show more ...
|
| #
cf6267ce |
| 29-Apr-2019 |
Nico Weber <[email protected]> |
llvm-cvtres: Attempt to make llvm-cvtres/duplicate.test work on big-endian systems
llvm-svn: 359414
|
| #
23cb79ff |
| 24-Apr-2019 |
Nico Weber <[email protected]> |
llvm-cvtres: Make new dupe resource error a bit friendlier
For well-known type IDs, include the name of the type.
To not duplicate the ID->name map, make llvm-readobj call this new function as well
llvm-cvtres: Make new dupe resource error a bit friendlier
For well-known type IDs, include the name of the type.
To not duplicate the ID->name map, make llvm-readobj call this new function as well. It has slightly different output, so this also requires updating a few tests.
Differential Revision: https://reviews.llvm.org/D61086
llvm-svn: 359153
show more ...
|
| #
ccf09646 |
| 24-Apr-2019 |
Nico Weber <[email protected]> |
Let llvm-cvtres (and lld-link) report duplicate resources
If two .res files contain the same resource, cvtres.exe (and hence link.exe) reject the input with this message:
CVTRES : fatal error C
Let llvm-cvtres (and lld-link) report duplicate resources
If two .res files contain the same resource, cvtres.exe (and hence link.exe) reject the input with this message:
CVTRES : fatal error CVT1100: duplicate resource. type:STRING, name:101, language:0x0409 LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
llvm-cvtres (and lld-link) used to silently pick one of the duplicate resources instead. This patch makes them report an error as well. We slightly improve on cvtres by printing the name of two .res files containing duplicate entries as well.
Differential Revision: https://reviews.llvm.org/D61049
llvm-svn: 359083
show more ...
|
| #
6967da8f |
| 23-Apr-2019 |
Nico Weber <[email protected]> |
llvm-cvtres: Split addChild(ID) into two functions
Before, there was an IsData parameter. Now, there are two different functions for data nodes and ID nodes. No behavior change, needed for a follow-
llvm-cvtres: Split addChild(ID) into two functions
Before, there was an IsData parameter. Now, there are two different functions for data nodes and ID nodes. No behavior change, needed for a follow-up change to make two data nodes (but not two ID nodes) with the same ID an error.
For consistency, rename another addChild() overload to addNameChild().
llvm-svn: 359024
show more ...
|
|
Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3, llvmorg-7.1.0, llvmorg-7.1.0-rc1, llvmorg-8.0.0-rc2, llvmorg-8.0.0-rc1 |
|
| #
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <[email protected]> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
| #
75709329 |
| 17-Nov-2018 |
Fangrui Song <[email protected]> |
Use llvm::copy. NFC
llvm-svn: 347126
|
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1, llvmorg-7.0.0, llvmorg-7.0.0-rc3, llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1, llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2, llvmorg-6.0.1-rc1, llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2, llvmorg-6.0.0-rc1 |
|
| #
9aaf5d3e |
| 09-Jan-2018 |
Pavel Labath <[email protected]> |
[Support] Add WritableMemoryBuffer::getNewMemBuffer
Summary: The idea is that it would replace (non-Writable)MemoryBuffer::getNewMemBuffer, which is quite useless unless you const_cast its contents
[Support] Add WritableMemoryBuffer::getNewMemBuffer
Summary: The idea is that it would replace (non-Writable)MemoryBuffer::getNewMemBuffer, which is quite useless unless you const_cast its contents to write to it (which all (both) callers of this function were doing). This patch also fixes one of the usages in COFFWriter. After fixing the other usage in clang, I plan to delete the old function.
Reviewers: dblaikie, Bigcheese
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D41540
llvm-svn: 322094
show more ...
|
| #
ea5ff9fa |
| 18-Dec-2017 |
Bob Haarman <[email protected]> |
Fix buffer overrun in WindowsResourceCOFFWriter::writeSymbolTable()
Summary: We were using sprintf(..., "$R06X", <some uint32_t>) to create strings that are expected to be exactly length 8, but this
Fix buffer overrun in WindowsResourceCOFFWriter::writeSymbolTable()
Summary: We were using sprintf(..., "$R06X", <some uint32_t>) to create strings that are expected to be exactly length 8, but this results in longer strings if the uint32_t is greater than 0xffffff. This change modifies the behavior as follows:
- Uses the loop counter instead of the data offset. This gives us sequential symbol names, avoiding collisions as much as possible.
- Masks the value to 0xffffff to avoid generating names longer than 8 bytes.
- Uses formatv instead of sprintf.
Fixes PR35581.
Reviewers: ruiu, zturner
Reviewed By: ruiu
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D41270
llvm-svn: 321030
show more ...
|
| #
fdfbab2b |
| 13-Dec-2017 |
Michael Zolotukhin <[email protected]> |
Remove redundant includes from lib/Object.
llvm-svn: 320625
|
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
| #
ba664c1d |
| 10-Nov-2017 |
Martin Storsjo <[email protected]> |
[llvm-cvtres] Add support for ARM64
Also change some default cases into llvm_unreachable in WindowsResourceCOFFWriter, to make it easier to find if they are triggerd from within e.g. lld, which supp
[llvm-cvtres] Add support for ARM64
Also change some default cases into llvm_unreachable in WindowsResourceCOFFWriter, to make it easier to find if they are triggerd from within e.g. lld, which supported ARM64 earlier than llvm-cvtres did.
Differential Revision: https://reviews.llvm.org/D39892
llvm-svn: 317942
show more ...
|
| #
1657f2ad |
| 01-Nov-2017 |
NAKAMURA Takumi <[email protected]> |
Fix warnings discovered by rL317076. [-Wunused-private-field]
llvm-svn: 317091
|