+2019-08-20 Piotr Trojanek <trojanek@adacore.com>
+
+ * impunit.adb (Get_Kind_Of_Unit): Revert change for adapting
+ this routine for gnatprove.
+
2019-08-20 Arnaud Charlet <charlet@adacore.com>
* doc/gnat_rm/implementation_defined_pragmas.rst: Document
return Not_Predefined_Unit;
end if;
- -- To be considered predefined, the file name must end in .ads or .adb.
- -- File names with other extensions (coming from the use of non-standard
- -- file naming schemes) can never be predefined.
-
- -- Note that in the context of a compiler, the .adb case will never
- -- arise. However it can arise for other tools, e.g. gnatprove uses
- -- this routine to detect when a construct comes from an instance of
- -- a generic defined in a predefined unit.
-
- if File (File'Last - 3 .. File'Last) /= ".ads"
- and then
- File (File'Last - 3 .. File'Last) /= ".adb"
- then
+ -- Not predefined if file name does not end in .ads. This can happen
+ -- when non-standard file names are being used.
+
+ if Name_Buffer (Name_Len - 3 .. Name_Len) /= ".ads" then
return Not_Predefined_Unit;
end if;