Make Microsoft assembler and linker happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36265 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeff Cohen 2007-04-20 00:33:54 +00:00
parent 3e1b03f98d
commit 5d4d7f1580

View File

@ -355,6 +355,10 @@ bool X86IntelAsmPrinter::doInitialization(Module &M) {
if (I->hasDLLImportLinkage()) {
O << "__imp_";
}
// Microsoft sticks an extra _ in front of "_write" (whether LLVM should
// hard-code usage of a Unix API is another question).
if (Name == "_write")
Name = "__write";
O << Name << ":near\n";
}