Exemplo n.º 1
0
        public bool Remove(string key)
        {
            if (!InternalComdatMap.TryGetValue(key, out Comdat value))
            {
                return(false);
            }

            bool retVal = InternalComdatMap.Remove(key);

            if (retVal)
            {
                ClearComdatFromGlobals(key);
                NativeMethods.ModuleComdatRemove(Module.ModuleHandle, value.ComdatHandle);
            }

            return(retVal);
        }
Exemplo n.º 2
0
        /// <summary>Removes a <see cref="Comdat"/> entry from the module</summary>
        /// <param name="key">Name of the <see cref="Comdat"/></param>
        /// <returns>
        /// <see langword="true"/> if the value was in the list or
        /// <see langword="false"/> otherwise
        /// </returns>
        public bool Remove(string key)
        {
            key.ValidateNotNullOrWhiteSpace(nameof(key));

            if (!InternalComdatMap.TryGetValue(key, out Comdat value))
            {
                return(false);
            }

            bool retVal = InternalComdatMap.Remove(key);

            if (retVal)
            {
                ClearComdatFromGlobals(key);
                LibLLVMModuleComdatRemove(Module.ModuleHandle, value.ComdatHandle);
            }

            return(retVal);
        }