c++: Handle error header names in modules [PR107594]
commita88e08feb8367898e0562622517d33f95684a03d
authorNathaniel Shead <nathanieloshead@gmail.com>
Sat, 27 Jan 2024 11:46:44 +0000 (27 22:46 +1100)
committerNathaniel Shead <nathanieloshead@gmail.com>
Tue, 30 Jan 2024 03:48:53 +0000 (30 14:48 +1100)
treef8ba63308cdcf99bd73bf9dbbcf3a0b01a52770b
parent4822887b3c5df19b5a61a0db3248997a4d28161c
c++: Handle error header names in modules [PR107594]

When there are no include paths while preprocessing a header-name token,
an empty STRING_CST is returned. This patch ensures this is handled when
attempting to create a module for this name.

PR c++/107594

gcc/cp/ChangeLog:

* module.cc (get_module): Bail on empty name.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
gcc/cp/module.cc