Use case-insensitive string comparison for get_decl

This will allow us to detect cases where identifiers differ only by case
This commit is contained in:
Nick Gasson 2008-08-22 20:15:45 +01:00
parent 535ef6be38
commit fae7ab2418
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#include "vhdl_helper.hh"
#include <cassert>
#include <cstring>
#include <iostream>
#include <typeinfo>
@ -57,7 +58,7 @@ vhdl_decl *vhdl_scope::get_decl(const std::string &name) const
{
decl_list_t::const_iterator it;
for (it = decls_.begin(); it != decls_.end(); ++it) {
if ((*it)->get_name() == name)
if (strcasecmp((*it)->get_name().c_str(), name.c_str()) == 0)
return *it;
}