OLD | NEW |
1 //===-- Support/TargetRegistry.h - Target Registration ----------*- C++ -*-===// | 1 //===-- Support/TargetRegistry.h - Target Registration ----------*- C++ -*-===// |
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 exposes the TargetRegistry interface, which tools can use to access | 10 // This file exposes the TargetRegistry interface, which tools can use to access |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 /// given target. | 726 /// given target. |
727 /// | 727 /// |
728 /// Clients are responsible for ensuring that registration doesn't occur | 728 /// Clients are responsible for ensuring that registration doesn't occur |
729 /// while another thread is attempting to access the registry. Typically | 729 /// while another thread is attempting to access the registry. Typically |
730 /// this is done by initializing all targets at program startup. | 730 /// this is done by initializing all targets at program startup. |
731 /// | 731 /// |
732 /// @param T - The target being registered. | 732 /// @param T - The target being registered. |
733 /// @param Fn - A function to construct an MCInstPrinter for the target. | 733 /// @param Fn - A function to construct an MCInstPrinter for the target. |
734 static void RegisterMCInstPrinter(Target &T, | 734 static void RegisterMCInstPrinter(Target &T, |
735 Target::MCInstPrinterCtorTy Fn) { | 735 Target::MCInstPrinterCtorTy Fn) { |
| 736 // @LOCALMOD-BEGIN |
| 737 // Prune out the .s printer for the sandboxed translator, |
| 738 // by preventing an InstPrinter from being used at all. |
| 739 #if !defined(__native_client__) |
736 T.MCInstPrinterCtorFn = Fn; | 740 T.MCInstPrinterCtorFn = Fn; |
| 741 #endif |
| 742 // @LOCALMOD-END |
737 } | 743 } |
738 | 744 |
739 /// RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the | 745 /// RegisterMCCodeEmitter - Register a MCCodeEmitter implementation for the |
740 /// given target. | 746 /// given target. |
741 /// | 747 /// |
742 /// Clients are responsible for ensuring that registration doesn't occur | 748 /// Clients are responsible for ensuring that registration doesn't occur |
743 /// while another thread is attempting to access the registry. Typically | 749 /// while another thread is attempting to access the registry. Typically |
744 /// this is done by initializing all targets at program startup. | 750 /// this is done by initializing all targets at program startup. |
745 /// | 751 /// |
746 /// @param T - The target being registered. | 752 /// @param T - The target being registered. |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 const MCRegisterInfo &/*MRI*/, | 1151 const MCRegisterInfo &/*MRI*/, |
1146 const MCSubtargetInfo &/*STI*/, | 1152 const MCSubtargetInfo &/*STI*/, |
1147 MCContext &/*Ctx*/) { | 1153 MCContext &/*Ctx*/) { |
1148 return new MCCodeEmitterImpl(); | 1154 return new MCCodeEmitterImpl(); |
1149 } | 1155 } |
1150 }; | 1156 }; |
1151 | 1157 |
1152 } | 1158 } |
1153 | 1159 |
1154 #endif | 1160 #endif |
OLD | NEW |