diff options
| author | Tanya Lattner <tonic@nondot.org> | 2004-11-20 23:35:20 +0000 |
|---|---|---|
| committer | Tanya Lattner <tonic@nondot.org> | 2004-11-20 23:35:20 +0000 |
| commit | d27b014459286b7c567325407aa580a9563d3e4d (patch) | |
| tree | 4dca67648ade9977d1319b0f0d4652fe2f70ee18 | |
| parent | 9afecaf4ffdeb3380463bafe6ac796a5e436dad7 (diff) | |
| download | bcm5719-llvm-d27b014459286b7c567325407aa580a9563d3e4d.tar.gz bcm5719-llvm-d27b014459286b7c567325407aa580a9563d3e4d.zip | |
Fixed assertion from triggering. We need to check if the commandline map is empty before checking if an arg exists.
llvm-svn: 18057
| -rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 5abeb8d2ef1..9ae4cde1b21 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -80,6 +80,8 @@ static void AddArgument(const char *ArgName, Option *Opt) { // options have already been processed and the map has been deleted! // static void RemoveArgument(const char *ArgName, Option *Opt) { + if(getOpts().empty()) return; + #ifndef NDEBUG // This disgusting HACK is brought to you courtesy of GCC 3.3.2, which ICE's // If we pass ArgName directly into getOption here. |

