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 | c4ae8e903c6abd7e391e8a16f8e850073342ca4d (patch) | |
tree | 390ca8f9d3ec1f66adb61d7779a874b24d33df94 | |
parent | 7a4538941af7e5eb2b00e0b7c25cb34be548bcf5 (diff) | |
download | external_llvm-c4ae8e903c6abd7e391e8a16f8e850073342ca4d.zip external_llvm-c4ae8e903c6abd7e391e8a16f8e850073342ca4d.tar.gz external_llvm-c4ae8e903c6abd7e391e8a16f8e850073342ca4d.tar.bz2 |
Fixed assertion from triggering. We need to check if the commandline map is empty before checking if an arg exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18057 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Support/CommandLine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp index 5abeb8d..9ae4cde 100644 --- a/lib/Support/CommandLine.cpp +++ b/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. |