mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Add support for reading/writing inline asm
llvm-svn: 25564
This commit is contained in:
parent
37f4d8a814
commit
8f3a1256b7
@ -2102,12 +2102,16 @@ void BytecodeReader::ParseModuleGlobalInfo() {
|
||||
if (Handler)
|
||||
Handler->handleTargetTriple(triple);
|
||||
|
||||
if (At != BlockEnd && !hasAlignment) {
|
||||
if (!hasAlignment && At != BlockEnd) {
|
||||
// If the file has section info in it, read the section names now.
|
||||
unsigned NumSections = read_vbr_uint();
|
||||
while (NumSections--)
|
||||
SectionNames.push_back(read_str());
|
||||
}
|
||||
|
||||
// If the file has module-level inline asm, read it now.
|
||||
if (!hasAlignment && At != BlockEnd)
|
||||
TheModule->setInlineAsm(read_str());
|
||||
}
|
||||
|
||||
// If any globals are in specified sections, assign them now.
|
||||
|
@ -1030,6 +1030,9 @@ void BytecodeWriter::outputModuleInfoBlock(const Module *M) {
|
||||
output_vbr((unsigned)SectionNames.size());
|
||||
for (unsigned i = 0, e = SectionNames.size(); i != e; ++i)
|
||||
output(SectionNames[i]);
|
||||
|
||||
// Output the inline asm string.
|
||||
output(M->getInlineAsm());
|
||||
}
|
||||
|
||||
void BytecodeWriter::outputInstructions(const Function *F) {
|
||||
|
Loading…
Reference in New Issue
Block a user