Message ID | 20240605202207.163176-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | [1/2] contrib: Fix KeyError errors in header-tools/gcc-order-headers | expand |
diff --git a/contrib/header-tools/gcc-order-headers b/contrib/header-tools/gcc-order-headers index 87fdddf60ee..85144cbd67b 100755 --- a/contrib/header-tools/gcc-order-headers +++ b/contrib/header-tools/gcc-order-headers @@ -98,10 +98,11 @@ def process_known_dups (): rtl_remove = includes["coretypes.h"][1] + ["statistics.h", "vec.h"] if dups: for i in rtl_remove: - if dups[i] and "rtl.h" in dups[i]: - dups[i].remove("rtl.h") - if not dups[i]: - dups.pop (i, None) + if i in dups: + if "rtl.h" in dups[i]: + dups[i].remove("rtl.h") + if not dups[i]: + dups.pop (i, None) # make sure diagnostic.h is the owner of diagnostic-core.h if includes["diagnostic-core.h"][0] != "diagnostic.h":