llvm-6502/tools
Peter Collingbourne a6367d9136 Teach LTOModule to emit linker flags for dllexported symbols, plus interface cleanup.
This change unifies how LTOModule and the backend obtain linker flags
for globals: via a new TargetLoweringObjectFile member function named
emitLinkerFlagsForGlobal. A new function LTOModule::getLinkerOpts() returns
the list of linker flags as a single concatenated string.

This change affects the C libLTO API: the function lto_module_get_*deplibs now
exposes an empty list, and lto_module_get_*linkeropts exposes a single element
which combines the contents of all observed flags. libLTO should never have
tried to parse the linker flags; it is the linker's job to do so. Because
linkers will need to be able to parse flags in regular object files, it
makes little sense for libLTO to have a redundant mechanism for doing so.

The new API is compatible with the old one. It is valid for a user to specify
multiple linker flags in a single pragma directive like this:

 #pragma comment(linker, "/defaultlib:foo /defaultlib:bar")

The previous implementation would not have exposed
either flag via lto_module_get_*deplibs (as the test in
TargetLoweringObjectFileCOFF::getDepLibFromLinkerOpt was case sensitive)
and would have exposed "/defaultlib:foo /defaultlib:bar" as a single flag via
lto_module_get_*linkeropts. This may have been a bug in the implementation,
but it does give us a chance to fix the interface.

Differential Revision: http://reviews.llvm.org/D10548

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241010 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-29 22:04:09 +00:00
..
bugpoint Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
bugpoint-passes
dsymutil Silencing spurious MSVC C4189 warnings regarding local variables that are initialized but not used; NFC. This bug has been reported to Microsoft (https://connect.microsoft.com/VisualStudio/feedback/details/1475983). 2015-06-26 14:51:22 +00:00
gold gold-plugin: save the .o when given -save-temps. 2015-06-15 13:36:27 +00:00
llc MIR Serialization: Connect the machine function analysis pass to the MIR parser. 2015-06-15 20:30:22 +00:00
lli Simplify the Mangler interface now that DataLayout is mandatory. 2015-06-23 13:59:29 +00:00
llvm-ar ArrayRef-ify libDriverMain 2015-06-21 06:31:56 +00:00
llvm-as
llvm-bcanalyzer
llvm-c-test
llvm-config
llvm-cov [Object] Search for architecures by name in MachOUniversalBinary::getObjectForArch() 2015-06-22 21:33:24 +00:00
llvm-cxxdump Make computeSymbolSizes never fail. 2015-06-24 19:57:32 +00:00
llvm-diff
llvm-dis Use std::unique_ptr to manage the DataStreamer in bitcode parsing. 2015-06-16 23:29:49 +00:00
llvm-dwarfdump Make llvm-dwarfdump exit with non-zero exit code if error was occured. 2015-06-25 23:40:15 +00:00
llvm-extract
llvm-go
llvm-jitlistener Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
llvm-link
llvm-lto add missing dependency on Target lib for tools 2015-06-03 19:07:51 +00:00
llvm-mc Use named temporaries for directional labels. 2015-06-17 16:26:47 +00:00
llvm-mcmarkup
llvm-nm Simplify isSymbolList64Bit. NFC. 2015-06-26 14:11:54 +00:00
llvm-objdump Convert obj->getSymbolName to sym->getName. 2015-06-29 21:24:55 +00:00
llvm-pdbdump Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
llvm-profdata modules: Move ProfileKinds to an anonymous namespace 2015-06-16 00:43:04 +00:00
llvm-readobj Convert obj->getSymbolName to sym->getName. 2015-06-29 21:24:55 +00:00
llvm-rtdyld Simplify getSymbolType. 2015-06-26 12:18:49 +00:00
llvm-shlib
llvm-size Fix "the the" in comments. 2015-06-19 01:53:21 +00:00
llvm-stress [llvm-stress] Simple refactoring and better style. NFC. 2015-06-24 11:49:44 +00:00
llvm-symbolizer Simplify getSymbolType. 2015-06-26 12:18:49 +00:00
lto Teach LTOModule to emit linker flags for dllexported symbols, plus interface cleanup. 2015-06-29 22:04:09 +00:00
macho-dump [Object, MachO] Introduce MachOObjectFile::load_commands() range iterator. 2015-06-03 22:19:36 +00:00
msbuild
obj2yaml Convert obj->getSymbolName to sym->getName. 2015-06-29 21:24:55 +00:00
opt Revert "(HEAD -> master, origin/master, origin/HEAD) opt: Add option to strip or add llvm value names" 2015-06-24 20:04:26 +00:00
verify-uselistorder Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
yaml2obj Simplify now that we always use an alignment of 2 for ELF files. 2015-06-02 12:05:27 +00:00
CMakeLists.txt [CMake] Treating LLVM_INCLUDE_TOOLS, which is a bool, as a string to change behaviors of the build is a dirty hack. We shouldn't do it. 2015-06-22 21:58:02 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile Do not build LLD from tools/Makefile, as LLD no longer has a Makefile build. 2015-06-08 04:04:13 +00:00