Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 //===-- LTOModule.cpp - LLVM Link Time Optimizer --------------------------===// | 1 //===-- LTOModule.cpp - LLVM Link Time Optimizer --------------------------===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file implements the Link Time Optimization library. This library is | 10 // This file implements the Link Time Optimization library. This library is |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 622 SrcMgr.AddNewSourceBuffer(Buffer, SMLoc()); | 622 SrcMgr.AddNewSourceBuffer(Buffer, SMLoc()); |
| 623 OwningPtr<MCAsmParser> Parser(createMCAsmParser(SrcMgr, | 623 OwningPtr<MCAsmParser> Parser(createMCAsmParser(SrcMgr, |
| 624 Context, *Streamer, | 624 Context, *Streamer, |
| 625 *_target->getMCAsmInfo())); | 625 *_target->getMCAsmInfo())); |
| 626 OwningPtr<MCSubtargetInfo> STI(_target->getTarget(). | 626 OwningPtr<MCSubtargetInfo> STI(_target->getTarget(). |
| 627 createMCSubtargetInfo(_target->getTargetTriple(), | 627 createMCSubtargetInfo(_target->getTargetTriple(), |
| 628 _target->getTargetCPU(), | 628 _target->getTargetCPU(), |
| 629 _target->getTargetFeatureString())); | 629 _target->getTargetFeatureString())); |
| 630 OwningPtr<MCTargetAsmParser> | 630 OwningPtr<MCTargetAsmParser> |
| 631 TAP(_target->getTarget().createMCAsmParser(*STI, *Parser.get())); | 631 TAP(_target->getTarget().createMCAsmParser(*STI, *Parser.get())); |
| 632 if (!TAP) { | |
|
nlewycky
2011/09/08 00:34:43
No braces.
| |
| 633 return true; | |
| 634 } | |
| 635 | |
| 632 Parser->setTargetParser(*TAP); | 636 Parser->setTargetParser(*TAP); |
| 633 int Res = Parser->Run(false); | 637 int Res = Parser->Run(false); |
| 634 if (Res) | 638 if (Res) |
| 635 return true; | 639 return true; |
| 636 | 640 |
| 637 for (RecordStreamer::const_iterator i = Streamer->begin(), | 641 for (RecordStreamer::const_iterator i = Streamer->begin(), |
| 638 e = Streamer->end(); i != e; ++i) { | 642 e = Streamer->end(); i != e; ++i) { |
| 639 StringRef Key = i->first(); | 643 StringRef Key = i->first(); |
| 640 RecordStreamer::State Value = i->second; | 644 RecordStreamer::State Value = i->second; |
| 641 if (Value == RecordStreamer::DefinedGlobal) | 645 if (Value == RecordStreamer::DefinedGlobal) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 721 else | 725 else |
| 722 return lto_symbol_attributes(0); | 726 return lto_symbol_attributes(0); |
| 723 } | 727 } |
| 724 | 728 |
| 725 const char *LTOModule::getSymbolName(uint32_t index) { | 729 const char *LTOModule::getSymbolName(uint32_t index) { |
| 726 if (index < _symbols.size()) | 730 if (index < _symbols.size()) |
| 727 return _symbols[index].name; | 731 return _symbols[index].name; |
| 728 else | 732 else |
| 729 return NULL; | 733 return NULL; |
| 730 } | 734 } |
| OLD | NEW |