def BuildCode(self):
    filePtr = open(self.fileName.replace('.ir', '.s'), 'w+')
    for bb in self.basicBlocks:
        bb.Translate()
    G.AsmText.WriteHeader(filePtr)
    G.AsmData.GenerateDataRegion(filePtr)
    G.AsmText.WriteToFile(filePtr)
    filePtr.close()
def BuildCode(self):
    filePtr = open(self.fileName.replace('.ir', '.s'), 'w+')
    for bb in self.basicBlocks:
        bb.Translate()
    G.AsmText.WriteHeader(filePtr)
    G.AsmData.GenerateDataRegion(filePtr)
    G.AsmText.WriteToFile(filePtr)
    filePtr.close()