diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-03-22 16:48:17 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-03-22 16:48:17 +0000 |
commit | 3c66d30d513106bb794990c5e4ba36a31ac19f15 (patch) | |
tree | 0dd0bcea893dcd50b730a9911825e8e64273212f /include | |
parent | e5a3ce6dd555788a49efaabc3bd46d704e5e9d65 (diff) |
Frontend: Add a more explicit -backend-option flag for passing backend command
line options, instead of leveraging the blanket -mllvm option.
- This allows using the frontend itself without requiring the backend have
those options available (i.e., if the target wasn't built).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Driver/CC1Options.td | 2 | ||||
-rw-r--r-- | include/clang/Frontend/CodeGenOptions.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 418823482b..b29d73fd02 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -155,6 +155,8 @@ def momit_leaf_frame_pointer : Flag<"-momit-leaf-frame-pointer">, HelpText<"Omit frame pointer setup for leaf functions.">; def msoft_float : Flag<"-msoft-float">, HelpText<"Use software floating point">; +def backend_option : Separate<"-backend-option">, + HelpText<"Additional arguments to forward to LLVM backend (during code gen)">; def mregparm : Separate<"-mregparm">, HelpText<"Limit the number of registers available for integer arguments">; def mrelax_all : Flag<"-mrelax-all">, diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h index 875fbcd177..b49c431817 100644 --- a/include/clang/Frontend/CodeGenOptions.h +++ b/include/clang/Frontend/CodeGenOptions.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_FRONTEND_CODEGENOPTIONS_H #include <string> +#include <vector> namespace clang { @@ -114,6 +115,9 @@ public: /// The name of the relocation model to use. std::string RelocationModel; + /// A list of command-line options to forward to the LLVM backend. + std::vector<std::string> BackendOptions; + /// The user specified number of registers to be used for integral arguments, /// or 0 if unspecified. unsigned NumRegisterParameters; |