Chris Lattner | f1b20d8 | 2006-06-06 22:30:59 +0000 | [diff] [blame] | 1 | //===-- tools/bugpoint/ToolRunner.h -----------------------------*- C++ -*-===// |
Misha Brukman | 63b3afa | 2005-04-21 20:48:15 +0000 | [diff] [blame] | 2 | // |
John Criswell | 6fbcc26 | 2003-10-20 20:19:47 +0000 | [diff] [blame] | 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 21c62da | 2007-12-29 20:44:31 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Misha Brukman | 63b3afa | 2005-04-21 20:48:15 +0000 | [diff] [blame] | 7 | // |
John Criswell | 6fbcc26 | 2003-10-20 20:19:47 +0000 | [diff] [blame] | 8 | //===----------------------------------------------------------------------===// |
Chris Lattner | f474449 | 2003-09-30 18:28:53 +0000 | [diff] [blame] | 9 | // |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 10 | // This file exposes an abstraction around a platform C compiler, used to |
| 11 | // compile C and assembly code. It also exposes an "AbstractIntepreter" |
| 12 | // interface, which is used to execute code using one of the LLVM execution |
| 13 | // engines. |
Chris Lattner | f474449 | 2003-09-30 18:28:53 +0000 | [diff] [blame] | 14 | // |
| 15 | //===----------------------------------------------------------------------===// |
| 16 | |
Chris Lattner | f1b20d8 | 2006-06-06 22:30:59 +0000 | [diff] [blame] | 17 | #ifndef BUGPOINT_TOOLRUNNER_H |
| 18 | #define BUGPOINT_TOOLRUNNER_H |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 19 | |
Daniel Dunbar | ca74096 | 2009-08-18 03:35:57 +0000 | [diff] [blame^] | 20 | #include "llvm/ADT/Triple.h" |
Anton Korobeynikov | 86c006a | 2009-08-05 09:32:10 +0000 | [diff] [blame] | 21 | #include "llvm/Support/CommandLine.h" |
Reid Spencer | 551ccae | 2004-09-01 22:55:40 +0000 | [diff] [blame] | 22 | #include "llvm/Support/SystemUtils.h" |
Alkis Evlogimenos | 1d29a6d | 2004-02-19 07:39:26 +0000 | [diff] [blame] | 23 | #include <exception> |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 24 | #include <vector> |
| 25 | |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 26 | namespace llvm { |
| 27 | |
Anton Korobeynikov | 86c006a | 2009-08-05 09:32:10 +0000 | [diff] [blame] | 28 | extern cl::opt<bool> SaveTemps; |
Daniel Dunbar | ca74096 | 2009-08-18 03:35:57 +0000 | [diff] [blame^] | 29 | extern Triple TargetTriple; |
Anton Korobeynikov | 86c006a | 2009-08-05 09:32:10 +0000 | [diff] [blame] | 30 | |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 31 | class CBE; |
| 32 | class LLC; |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 33 | |
Chris Lattner | 8c56be5 | 2004-02-18 20:21:57 +0000 | [diff] [blame] | 34 | /// ToolExecutionError - An instance of this class is thrown by the |
| 35 | /// AbstractInterpreter instances if there is an error running a tool (e.g., LLC |
| 36 | /// crashes) which prevents execution of the program. |
| 37 | /// |
Alkis Evlogimenos | 1d29a6d | 2004-02-19 07:39:26 +0000 | [diff] [blame] | 38 | class ToolExecutionError : std::exception { |
Chris Lattner | 8c56be5 | 2004-02-18 20:21:57 +0000 | [diff] [blame] | 39 | std::string Message; |
| 40 | public: |
Alkis Evlogimenos | 1d29a6d | 2004-02-19 07:39:26 +0000 | [diff] [blame] | 41 | explicit ToolExecutionError(const std::string &M) : Message(M) {} |
| 42 | virtual ~ToolExecutionError() throw(); |
| 43 | virtual const char* what() const throw() { return Message.c_str(); } |
Chris Lattner | 8c56be5 | 2004-02-18 20:21:57 +0000 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 47 | //===---------------------------------------------------------------------===// |
| 48 | // GCC abstraction |
| 49 | // |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 50 | class GCC { |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 51 | sys::Path GCCPath; // The path to the gcc executable. |
| 52 | sys::Path RemoteClientPath; // The path to the rsh / ssh executable. |
| 53 | std::vector<std::string> gccArgs; // GCC-specific arguments. |
| 54 | GCC(const sys::Path &gccPath, const sys::Path &RemotePath, |
| 55 | const std::vector<std::string> *GCCArgs) |
| 56 | : GCCPath(gccPath), RemoteClientPath(RemotePath) { |
| 57 | if (GCCArgs) gccArgs = *GCCArgs; |
| 58 | } |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 59 | public: |
| 60 | enum FileType { AsmFile, CFile }; |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 61 | |
Dan Gohman | 197f728 | 2009-08-05 20:21:17 +0000 | [diff] [blame] | 62 | static GCC *create(std::string &Message, |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 63 | const std::vector<std::string> *Args); |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 64 | |
Chris Lattner | eeed983 | 2003-10-14 21:52:52 +0000 | [diff] [blame] | 65 | /// ExecuteProgram - Execute the program specified by "ProgramFile" (which is |
| 66 | /// either a .s file, or a .c file, specified by FileType), with the specified |
| 67 | /// arguments. Standard input is specified with InputFile, and standard |
| 68 | /// Output is captured to the specified OutputFile location. The SharedLibs |
| 69 | /// option specifies optional native shared objects that can be loaded into |
| 70 | /// the program for execution. |
| 71 | /// |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 72 | int ExecuteProgram(const std::string &ProgramFile, |
| 73 | const std::vector<std::string> &Args, |
| 74 | FileType fileType, |
| 75 | const std::string &InputFile, |
| 76 | const std::string &OutputFile, |
Reid Spencer | 51ab5c8 | 2006-06-06 00:00:42 +0000 | [diff] [blame] | 77 | const std::vector<std::string> &GCCArgs = |
| 78 | std::vector<std::string>(), |
Anton Korobeynikov | 9ba8a76 | 2007-02-16 19:11:07 +0000 | [diff] [blame] | 79 | unsigned Timeout = 0, |
| 80 | unsigned MemoryLimit = 0); |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 81 | |
Chris Lattner | eeed983 | 2003-10-14 21:52:52 +0000 | [diff] [blame] | 82 | /// MakeSharedObject - This compiles the specified file (which is either a .c |
| 83 | /// file or a .s file) into a shared object. |
| 84 | /// |
| 85 | int MakeSharedObject(const std::string &InputFile, FileType fileType, |
Chris Lattner | 130e2a3 | 2006-06-27 20:35:36 +0000 | [diff] [blame] | 86 | std::string &OutputFile, |
| 87 | const std::vector<std::string> &ArgsForGCC); |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 88 | }; |
| 89 | |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 90 | |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 91 | //===---------------------------------------------------------------------===// |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 92 | /// AbstractInterpreter Class - Subclasses of this class are used to execute |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 93 | /// LLVM bitcode in a variety of ways. This abstract interface hides this |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 94 | /// complexity behind a simple interface. |
| 95 | /// |
Jeff Cohen | 8388195 | 2005-01-22 16:30:58 +0000 | [diff] [blame] | 96 | class AbstractInterpreter { |
| 97 | public: |
Dan Gohman | 197f728 | 2009-08-05 20:21:17 +0000 | [diff] [blame] | 98 | static CBE *createCBE(const char *Argv0, std::string &Message, |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 99 | const std::vector<std::string> *Args = 0, |
| 100 | const std::vector<std::string> *GCCArgs = 0); |
Dan Gohman | 197f728 | 2009-08-05 20:21:17 +0000 | [diff] [blame] | 101 | static LLC *createLLC(const char *Argv0, std::string &Message, |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 102 | const std::vector<std::string> *Args = 0, |
| 103 | const std::vector<std::string> *GCCArgs = 0); |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 104 | |
Dan Gohman | 197f728 | 2009-08-05 20:21:17 +0000 | [diff] [blame] | 105 | static AbstractInterpreter* createLLI(const char *Argv0, std::string &Message, |
Brian Gaeke | d11577b | 2004-05-04 21:09:01 +0000 | [diff] [blame] | 106 | const std::vector<std::string> *Args=0); |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 107 | |
Dan Gohman | 197f728 | 2009-08-05 20:21:17 +0000 | [diff] [blame] | 108 | static AbstractInterpreter* createJIT(const char *Argv0, std::string &Message, |
Brian Gaeke | d11577b | 2004-05-04 21:09:01 +0000 | [diff] [blame] | 109 | const std::vector<std::string> *Args=0); |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 110 | |
Dan Gohman | 197f728 | 2009-08-05 20:21:17 +0000 | [diff] [blame] | 111 | static AbstractInterpreter* createCustom(std::string &Message, |
Anton Korobeynikov | 9ef7425 | 2008-04-28 20:53:48 +0000 | [diff] [blame] | 112 | const std::string &ExecCommandLine); |
| 113 | |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 114 | |
| 115 | virtual ~AbstractInterpreter() {} |
| 116 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 117 | /// compileProgram - Compile the specified program from bitcode to executable |
Chris Lattner | f03715c | 2004-02-18 23:24:29 +0000 | [diff] [blame] | 118 | /// code. This does not produce any output, it is only used when debugging |
| 119 | /// the code generator. If the code generator fails, an exception should be |
| 120 | /// thrown, otherwise, this function will just return. |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 121 | virtual void compileProgram(const std::string &Bitcode) {} |
Chris Lattner | f03715c | 2004-02-18 23:24:29 +0000 | [diff] [blame] | 122 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 123 | /// OutputCode - Compile the specified program from bitcode to code |
Chris Lattner | c600f3c | 2006-09-15 21:29:15 +0000 | [diff] [blame] | 124 | /// understood by the GCC driver (either C or asm). If the code generator |
| 125 | /// fails, an exception should be thrown, otherwise, this function returns the |
| 126 | /// type of code emitted. |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 127 | virtual GCC::FileType OutputCode(const std::string &Bitcode, |
Chris Lattner | c600f3c | 2006-09-15 21:29:15 +0000 | [diff] [blame] | 128 | sys::Path &OutFile) { |
| 129 | throw std::string("OutputCode not supported by this AbstractInterpreter!"); |
| 130 | } |
| 131 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 132 | /// ExecuteProgram - Run the specified bitcode file, emitting output to the |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 133 | /// specified filename. This returns the exit code of the program. |
| 134 | /// |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 135 | virtual int ExecuteProgram(const std::string &Bitcode, |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 136 | const std::vector<std::string> &Args, |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 137 | const std::string &InputFile, |
| 138 | const std::string &OutputFile, |
Reid Spencer | 51ab5c8 | 2006-06-06 00:00:42 +0000 | [diff] [blame] | 139 | const std::vector<std::string> &GCCArgs = |
| 140 | std::vector<std::string>(), |
Misha Brukman | 63b3afa | 2005-04-21 20:48:15 +0000 | [diff] [blame] | 141 | const std::vector<std::string> &SharedLibs = |
Chris Lattner | 62c91fc | 2004-07-24 07:48:50 +0000 | [diff] [blame] | 142 | std::vector<std::string>(), |
Anton Korobeynikov | 9ba8a76 | 2007-02-16 19:11:07 +0000 | [diff] [blame] | 143 | unsigned Timeout = 0, |
| 144 | unsigned MemoryLimit = 0) = 0; |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 145 | }; |
| 146 | |
| 147 | //===---------------------------------------------------------------------===// |
| 148 | // CBE Implementation of AbstractIntepreter interface |
| 149 | // |
| 150 | class CBE : public AbstractInterpreter { |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 151 | sys::Path LLCPath; // The path to the `llc' executable. |
| 152 | std::vector<std::string> ToolArgs; // Extra args to pass to LLC. |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 153 | GCC *gcc; |
| 154 | public: |
Reid Spencer | 2418bf9 | 2004-12-19 17:59:45 +0000 | [diff] [blame] | 155 | CBE(const sys::Path &llcPath, GCC *Gcc, |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 156 | const std::vector<std::string> *Args) |
| 157 | : LLCPath(llcPath), gcc(Gcc) { |
Brian Gaeke | d11577b | 2004-05-04 21:09:01 +0000 | [diff] [blame] | 158 | ToolArgs.clear (); |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 159 | if (Args) ToolArgs = *Args; |
Brian Gaeke | d11577b | 2004-05-04 21:09:01 +0000 | [diff] [blame] | 160 | } |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 161 | ~CBE() { delete gcc; } |
| 162 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 163 | /// compileProgram - Compile the specified program from bitcode to executable |
Chris Lattner | f03715c | 2004-02-18 23:24:29 +0000 | [diff] [blame] | 164 | /// code. This does not produce any output, it is only used when debugging |
| 165 | /// the code generator. If the code generator fails, an exception should be |
| 166 | /// thrown, otherwise, this function will just return. |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 167 | virtual void compileProgram(const std::string &Bitcode); |
Chris Lattner | f03715c | 2004-02-18 23:24:29 +0000 | [diff] [blame] | 168 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 169 | virtual int ExecuteProgram(const std::string &Bitcode, |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 170 | const std::vector<std::string> &Args, |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 171 | const std::string &InputFile, |
| 172 | const std::string &OutputFile, |
Reid Spencer | 51ab5c8 | 2006-06-06 00:00:42 +0000 | [diff] [blame] | 173 | const std::vector<std::string> &GCCArgs = |
| 174 | std::vector<std::string>(), |
Misha Brukman | 63b3afa | 2005-04-21 20:48:15 +0000 | [diff] [blame] | 175 | const std::vector<std::string> &SharedLibs = |
Chris Lattner | 62c91fc | 2004-07-24 07:48:50 +0000 | [diff] [blame] | 176 | std::vector<std::string>(), |
Anton Korobeynikov | 9ba8a76 | 2007-02-16 19:11:07 +0000 | [diff] [blame] | 177 | unsigned Timeout = 0, |
| 178 | unsigned MemoryLimit = 0); |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 179 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 180 | /// OutputCode - Compile the specified program from bitcode to code |
Chris Lattner | c600f3c | 2006-09-15 21:29:15 +0000 | [diff] [blame] | 181 | /// understood by the GCC driver (either C or asm). If the code generator |
| 182 | /// fails, an exception should be thrown, otherwise, this function returns the |
| 183 | /// type of code emitted. |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 184 | virtual GCC::FileType OutputCode(const std::string &Bitcode, |
Chris Lattner | c600f3c | 2006-09-15 21:29:15 +0000 | [diff] [blame] | 185 | sys::Path &OutFile); |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 186 | }; |
| 187 | |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 188 | |
| 189 | //===---------------------------------------------------------------------===// |
| 190 | // LLC Implementation of AbstractIntepreter interface |
| 191 | // |
| 192 | class LLC : public AbstractInterpreter { |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 193 | std::string LLCPath; // The path to the LLC executable. |
| 194 | std::vector<std::string> ToolArgs; // Extra args to pass to LLC. |
| 195 | std::vector<std::string> gccArgs; // Extra args to pass to GCC. |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 196 | GCC *gcc; |
| 197 | public: |
Brian Gaeke | d11577b | 2004-05-04 21:09:01 +0000 | [diff] [blame] | 198 | LLC(const std::string &llcPath, GCC *Gcc, |
Bill Wendling | 38efa38 | 2009-03-02 23:13:18 +0000 | [diff] [blame] | 199 | const std::vector<std::string> *Args, |
| 200 | const std::vector<std::string> *GCCArgs) |
| 201 | : LLCPath(llcPath), gcc(Gcc) { |
| 202 | ToolArgs.clear(); |
| 203 | if (Args) ToolArgs = *Args; |
| 204 | if (GCCArgs) gccArgs = *GCCArgs; |
Brian Gaeke | d11577b | 2004-05-04 21:09:01 +0000 | [diff] [blame] | 205 | } |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 206 | ~LLC() { delete gcc; } |
| 207 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 208 | /// compileProgram - Compile the specified program from bitcode to executable |
Chris Lattner | f03715c | 2004-02-18 23:24:29 +0000 | [diff] [blame] | 209 | /// code. This does not produce any output, it is only used when debugging |
| 210 | /// the code generator. If the code generator fails, an exception should be |
| 211 | /// thrown, otherwise, this function will just return. |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 212 | virtual void compileProgram(const std::string &Bitcode); |
Chris Lattner | f03715c | 2004-02-18 23:24:29 +0000 | [diff] [blame] | 213 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 214 | virtual int ExecuteProgram(const std::string &Bitcode, |
Chris Lattner | 7915a1e | 2003-10-14 21:34:11 +0000 | [diff] [blame] | 215 | const std::vector<std::string> &Args, |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 216 | const std::string &InputFile, |
| 217 | const std::string &OutputFile, |
Reid Spencer | 51ab5c8 | 2006-06-06 00:00:42 +0000 | [diff] [blame] | 218 | const std::vector<std::string> &GCCArgs = |
| 219 | std::vector<std::string>(), |
Misha Brukman | 63b3afa | 2005-04-21 20:48:15 +0000 | [diff] [blame] | 220 | const std::vector<std::string> &SharedLibs = |
Chris Lattner | 62c91fc | 2004-07-24 07:48:50 +0000 | [diff] [blame] | 221 | std::vector<std::string>(), |
Anton Korobeynikov | 9ba8a76 | 2007-02-16 19:11:07 +0000 | [diff] [blame] | 222 | unsigned Timeout = 0, |
| 223 | unsigned MemoryLimit = 0); |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 224 | |
Gabor Greif | 8ff70c2 | 2007-07-04 21:55:50 +0000 | [diff] [blame] | 225 | virtual GCC::FileType OutputCode(const std::string &Bitcode, |
Chris Lattner | c600f3c | 2006-09-15 21:29:15 +0000 | [diff] [blame] | 226 | sys::Path &OutFile); |
| 227 | |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 228 | }; |
| 229 | |
Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 230 | } // End llvm namespace |
| 231 | |
Misha Brukman | 29afb64 | 2003-09-29 22:38:57 +0000 | [diff] [blame] | 232 | #endif |