mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
Adding new LTO APIs to parse metadata nodes and extract linker options and
dependent libraries from a bitcode module. Differential Revision: http://llvm-reviews.chandlerc.com/D2343 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -402,6 +402,16 @@ TargetLoweringObjectFileELF::InitializeELF(bool UseInitArray_) {
|
||||
// MachO
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// getDepLibFromLinkerOpt - Extract the dependent library name from a linker
|
||||
/// option string. Returns StringRef() if the option does not specify a library.
|
||||
StringRef TargetLoweringObjectFileMachO::
|
||||
getDepLibFromLinkerOpt(StringRef LinkerOption) const {
|
||||
const char *LibCmd = "-l";
|
||||
if (LinkerOption.startswith(LibCmd))
|
||||
return LinkerOption.substr(strlen(LibCmd));
|
||||
return StringRef();
|
||||
}
|
||||
|
||||
/// emitModuleFlags - Perform code emission for module flags.
|
||||
void TargetLoweringObjectFileMachO::
|
||||
emitModuleFlags(MCStreamer &Streamer,
|
||||
@@ -774,6 +784,14 @@ SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
return DataSection;
|
||||
}
|
||||
|
||||
StringRef TargetLoweringObjectFileCOFF::
|
||||
getDepLibFromLinkerOpt(StringRef LinkerOption) const {
|
||||
const char *LibCmd = "/DEFAULTLIB:";
|
||||
if (LinkerOption.startswith(LibCmd))
|
||||
return LinkerOption.substr(strlen(LibCmd));
|
||||
return StringRef();
|
||||
}
|
||||
|
||||
void TargetLoweringObjectFileCOFF::
|
||||
emitModuleFlags(MCStreamer &Streamer,
|
||||
ArrayRef<Module::ModuleFlagEntry> ModuleFlags,
|
||||
|
||||
Reference in New Issue
Block a user