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:
parent
535ef6be38
commit
fae7ab2418
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue