mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-22 03:31:06 +00:00
updated handling dllexport in X86AsmPrinter
changed dllexport code to use EmitBytes instead of EmitRawText, and changed the export option to use /EXPORT: instead of -export: on the windows platform git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
071de920a0
commit
bb59732d18
@ -598,14 +598,28 @@ void X86AsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
// Output linker support code for dllexported globals on windows.
|
||||
if (!DLLExportedGlobals.empty() || !DLLExportedFns.empty()) {
|
||||
OutStreamer.SwitchSection(TLOFCOFF.getDrectveSection());
|
||||
for (unsigned i = 0, e = DLLExportedGlobals.size(); i != e; ++i)
|
||||
OutStreamer.EmitRawText("\t.ascii \" -export:" +
|
||||
Twine(DLLExportedGlobals[i]->getName()) +
|
||||
",data\"");
|
||||
SmallString<128> name;
|
||||
for (unsigned i = 0, e = DLLExportedGlobals.size(); i != e; ++i) {
|
||||
if (Subtarget->isTargetWindows())
|
||||
name = " /EXPORT:";
|
||||
else
|
||||
name = " -export:";
|
||||
name += DLLExportedGlobals[i]->getName();
|
||||
if (Subtarget->isTargetWindows())
|
||||
name += ",DATA";
|
||||
else
|
||||
name += ",data";
|
||||
OutStreamer.EmitBytes(name, 0);
|
||||
}
|
||||
|
||||
for (unsigned i = 0, e = DLLExportedFns.size(); i != e; ++i)
|
||||
OutStreamer.EmitRawText("\t.ascii \" -export:" +
|
||||
Twine(DLLExportedFns[i]->getName()) + "\"");
|
||||
for (unsigned i = 0, e = DLLExportedFns.size(); i != e; ++i) {
|
||||
if (Subtarget->isTargetWindows())
|
||||
name = " /EXPORT:";
|
||||
else
|
||||
name = " -export:";
|
||||
name += DLLExportedFns[i]->getName();
|
||||
OutStreamer.EmitBytes(name, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user